首页 > 技术文章 > mui使用技巧

kaixin3946 2016-06-23 09:27 原文

1、document.addEventListener('plusready', function(){

  //console.log("所有plus api都应该在此事件发生后调用,否则会出现plus is undefined。"
});

2、 所有的内容应该写在 #mui-content 的部分,不然会出现错位,因为mui的框架自身带有一些header的position

3、mui的脚本写前一定先初始化:

例如: 

mui.init({
gestureConfig:{
tap: true, //默认为true
doubletap: true, //默认为false
longtap: true, //默认为false
swipe:true
},
preloadPages:[
{
url:"html/standardSJ.html",
}
]
});

4、mui获取对象不能直接mui(“.classname”),而是应该mui(“.classname”)[0]  来选取特定的对象。通过id获取也是一样。

推荐阅读