How to get Anchor Links to work in Jquery Mobile?

后端 未结 7 2261
情书的邮戳
情书的邮戳 2020-12-08 20:47

Jquery Mobile has decided to treat anchor links as page requests of sort. However, this isn\'t good if you have a load of blog posts which have anchor links to the same page

相关标签:
7条回答
  • 2020-12-08 21:28

    First you have to place this code into a custom.js file

    $(document).bind('mobileinit', function () {
        $.mobile.loader.prototype.options.disabled = true;
        $.mobile.ajaxEnabled = false;
        $.mobile.linkBindingEnabled = false;
        $.mobile.loadingMessage = false;
    });
    

    Then add this file into your webpage before the jquery mobile js is loaded. becuase 'mobilinit' event is triggered immediately

    0 讨论(0)
提交回复
热议问题