panelload not working
hnzlk2014 opened this issue · 3 comments
hnzlk2014 commented
<script type="text/javascript">
$.afui.useOSThemes=false;
$("#item1").on('panelload', function() { alert("i'm start")})
</script>
</head>
<body>
<div id="afui" class="ios7">
<div class="view" id="mainview">
<header>
<h1>首页</h1>
</header>
<div class="pages">
<div class="panel" data-title="首页" id="list" data-selected="true">
<ul class="mainmenu">
<li><a href="#item1"><b><img src="img/pidan.png" /></b><span>资料收集</span></a></li>
<li><a href="#item1"><b><img src="img/query.png" /></b><span>综合查询</span></a></li>
<li><a href="#item1"><b><img src="img/pidan.png" /></b><span>产品展示</span></a></li>
<li><a href="#item1"><b><img src="img/pidan.png" /></b><span>成功案例</span></a></li>
<li><a href="#item1"><b><img src="img/pidan.png" /></b><span>关于我们</span></a></li>
</ul>
</div>
<div class="panel" data-title="资料收集" id="item1" data-footer="none">
<p>This is detail view for Item 1</p>
</div>
</div>
</div>
</div>
</body>
panelload not working? why?
ArcRain commented
"panelload" should be used in "view" or "panel". You can try again.
e.g:
$("#view").on('panelload', function() { alert("i'm start")})
$("#list").on('panelload', function() { alert("i'm start")})
hnzlk2014 commented
$("#list").on('panelload', function() { alert("i'm start")})
Not work
ArcRain commented
After the DOM document ready, try to use your code.
$(document).ready(function(){
$("#list").on('panelload', function() { alert("i'm start")})
});