日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪(fǎng)問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

jQuery Mobile里xxx怎么用呀? (事件篇)

發(fā)布時(shí)間:2023/12/18 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 jQuery Mobile里xxx怎么用呀? (事件篇) 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

http://app-framework-software.intel.com/

http://app-framework-software.intel.com/api2/#$_proxy

?

?

jQuery Mobile里$(document).ready()怎么用呀?

相關(guān)鏈接:

    • http://stackoverflow.com/questions/14468659/jquery-mobile-document-ready-vs-page-events
    • http://jquerymobile.com/demos/1.2.1/docs/api/events.html
    • http://jquerymobile.com/demos/1.0.1/docs/pages/page-scripting.html

注意事項(xiàng):

    • Use $(document).bind('pageinit/pageshow'), not $(document).ready()
    • 默認(rèn)設(shè)置下,jQueryMobile網(wǎng)站第一個(gè)頁(yè)面之后的所有頁(yè)面都是使用AJAX去加載的,而document.ready只會(huì)在第一個(gè)頁(yè)面加載時(shí)執(zhí)行,that's why not document.ready.
    • 相對(duì)應(yīng)的,pageinit/pageshow事件則像是加載頁(yè)面AJAX代碼的一個(gè)回調(diào)(callback)函數(shù),請(qǐng)求成功后便觸發(fā)執(zhí)行

jQuery Mobile里mobileinit event怎么用呀?

相關(guān)鏈接:

    • http://jquerymobile.com/demos/1.2.1/docs/api/globalconfig.html

mobileinit事件的作用:

    • 更改默認(rèn)設(shè)置(To override default settings)
    • 在page加載之前綁定事件處理函數(shù)(bind pageshow/pageinit event handlers before page is loaded)

注意事項(xiàng):

    • mobileinit事件處理函數(shù)的代碼一定要放在在jquery加載之后,jquerymobile加載之前
    • <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script> $(document).on("mobileinit", function(){$(document).on('pageshow', 'div:jqmData(role="page"), div:jqmData(role="dialog")', function(event){//pageshow handler goes here });$(document).on('pageinit', function() { //pageinit handler goes here }); }); </script> <script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>

      ?

jQuery Mobile里page事件觸發(fā)順序是怎樣的?

First all events can be found here:?http://api.jquerymobile.com/category/events/

    • pagebeforeload,?pageload?and?pageloadfailed?are fired when an external page is loaded
    • pagebeforechange,?pagechange?and?pagechangefailed?are page change events. These events are fired when a user is navigating between pages in the applications.
    • pagebeforeshow,?pagebeforehide,?pageshow?and?pagehide?are page transition events. These events are fired before, during and after a transition and are named.
    • pagebeforecreate,?pagecreate?and?pageinit?are for page initialization.
    • pageremove?can be fired and then handled when a page is removed from the DOM

Page loading jsFiddle example:?http://jsfiddle.net/Gajotres/QGnft/

?

(以上內(nèi)容copy自http://stackoverflow.com/questions/14468659/jquery-mobile-document-ready-vs-page-events,有那么好的講解我為什么不用!)

轉(zhuǎn)載于:https://www.cnblogs.com/wicub/p/3425537.html

總結(jié)

以上是生活随笔為你收集整理的jQuery Mobile里xxx怎么用呀? (事件篇)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。