Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JQuery Mobile remove slide page transition

I'm working on a Mobile friendly web site and every time a button gets pressed I have the slide effect transition... and I can't find a way to remove it.

I tried adding:

<script>
  $(document).bind("mobileinit", function() {
      $.mobile.page.prototype.options.addBackBtn = true;
      $.mobile.defaultPageTransition = 'none';
      $.mobile.useFastClick  = false;
});
</script>

and

 <a href="page.html" data-role="button" data-theme="f" data-transition="none">NEXT</a>

but I still have the slide effect transition.

How do I remove it? Thanks! Marco

like image 745
MataMix Avatar asked Nov 09 '11 01:11

MataMix


1 Answers

This is working for me:

$(document).bind('pageinit', function () {
    $.mobile.defaultPageTransition = 'none';
});

jQuery Version: 1.6.4
jQuery Mobile version: 1.0.1

Live Example:
http://jsfiddle.net/jaf8P/

like image 94
DerLuz Avatar answered Sep 22 '22 11:09

DerLuz