Jquery mobile: Disable “tap to toggle” fixed header and footer

后端 未结 1 1888
情深已故
情深已故 2020-12-08 00:45

Is there a way to disable the fade in / fade out effect on tap with fixed toolbar ? http://jquerymobile.com/demos/1.0.1/docs/toolbars/footer-persist-a.html

Essential

相关标签:
1条回答
  • 2020-12-08 01:41

    If you want to disable the tap to toggle a fixed footer for version Jquery Mobile 1.0 you can use something like this:

    $(function(){
      $.mobile.fixedToolbars.setTouchToggleEnabled(false);
    });
    

    Jquery Mobile 1.1 changes the way you set the tap toggle feature to something like this:

    $(function(){
      $('[data-role=header],[data-role=footer]').fixedtoolbar({ tapToggle:false });
    });
    

    or in JQM 1.1 you can simply set data-tap-toggle="false":

    <div data-role="header" data-position="fixed" data-tap-toggle="false">
    
    0 讨论(0)
提交回复
热议问题