问题描述
- jquery mobile ajax加载后不能展开
-
各位大神帮忙看一下感激不尽
这是静态页面写的代码
可以正常的展开 收起<div data-role="collapsible" data-collapsed-icon="arrow-d" data-expanded-icon="arrow-u" class="ui-collapsible ui-collapsible-inset ui-first-child ui-collapsible-collapsed"> <h6 class="ui-collapsible-heading ui-collapsible-heading-collapsed"> <a href="#" class="ui-collapsible-heading-toggle ui-btn ui-btn-icon-left ui-btn-up-c" data-corners="false" data-shadow="false" data-iconshadow="true" data-wrapperels="span" data-icon="arrow-d" data-iconpos="left" data-theme="c"> <span class="ui-btn-inner"> <span class="ui-btn-text">潇洒 2013-12-3 早上 <span class="ui-collapsible-heading-status"> click to expand contents </span> </span> <span class="ui-icon ui-icon-shadow ui-icon-arrow-d"> </span> </span> </a> </h6> <div class="ui-collapsible-content ui-collapsible-content-collapsed" aria-hidden="true"> <ul data-role="listview" class="order-content ui-listview"> <li class="ui-li ui-li-static ui-btn-up-c ui-first-child">来源</li> <li class="ui-li ui-li-static ui-btn-up-c">部门(xx班/xx单位)</li> <li class="ui-li ui-li-static ui-btn-up-c">手机长号</li> <li class="ui-li ui-li-static ui-btn-up-c ui-last-child"> <form action="" method="post"> <div data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-theme="b" data-inline="true" data-mini="true" data-disabled="false" class="ui-submit ui-btn ui-btn-up-b ui-shadow ui-btn-corner-all ui-mini ui-btn-inline" aria-disabled="false"><span class="ui-btn-inner"><span class="ui-btn-text">同意</span></span><button type="submit" value="yes" data-inline="true" data-mini="true" data-theme="b" class="ui-btn-hidden" data-disabled="false">同意</button></div> <div data-corners="true" data-shadow="true" data-iconshadow="true" data-wrapperels="span" data-theme="b" data-inline="true" data-mini="true" data-disabled="false" class="ui-submit ui-btn ui-btn-up-b ui-shadow ui-btn-corner-all ui-mini ui-btn-inline" aria-disabled="false"><span class="ui-btn-inner"><span class="ui-btn-text">拒绝</span></span><button type="submit" value="no" data-inline="true" data-mini="true" data-theme="b" class="ui-btn-hidden" data-disabled="false">拒绝</button></div> </form> </li> </ul> </div></div>
但是用ajax加载 看起来也一个样子 但是点击没有展开的效果了 也展不开
是不是jquery mobile有什么特性需要禁用?或者是其他原因?
解决方案
jquery mobile通过其他方式加载生成页面元素后是需要刷新的。
这里有常用的刷新方式
http://blog.csdn.net/zht666/article/details/8560765
时间: 2024-10-29 21:04:23