相关疑难解决方法(0)

设置jQuery Mobile脚本

我是jQuery mobile的新手.我完全知道如何引用我的所有脚本和CSS文件.但是现在我对如何嵌入我自己的代码感到有些困惑.以我们使用的正常jQuery编码为例:

$(document).ready(function (){
   // we embedded codes here
});
Run Code Online (Sandbox Code Playgroud)

但对于jQuery Mobile,我有一个代码,我使用:

$(document).bind('pageinit',function (){

});
Run Code Online (Sandbox Code Playgroud)

所以我将所有代码嵌入其中.

所有代码都应该绑定吗?我对此有点困惑,或者我想什么时候在绑定中嵌入代码?它是在页面加载时我想要执行的代码吗?

另外mobileinit和pageinit有什么区别?

jquery jquery-mobile

5
推荐指数
1
解决办法
2406
查看次数

标签 统计

jquery ×1

jquery-mobile ×1