dgileadi / zepto-page-transitions

HTML5 Page Transitions similar to JQuery Mobile page transitions, but standalone (13k) and using Zepto.js
167 stars 46 forks source link

Setting default values using javascript #15

Closed Ruffio closed 11 years ago

Ruffio commented 11 years ago

I'm trying to set the default transition to slide by using this javascript per instruction:

But the default transition is not slide :-(

What do I do wrong?

dgileadi commented 11 years ago

This works for me. I used something like:

<script type="text/javascript">
    $(function($){
        $(document.body).transition('options', {defaultPageTransition: 'slide'});
    });
</script>

Also be aware that the default transition will be overridden by any transition attribute specified on links; it only applies to links without a transition attribute.