有了这个ddl,它可以正常使用这个版本的jQm“http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js”: 但是,如果我将其更改为1.2.0,则项目永远不会隐藏。有谁见过这个问题?
<asp:DropDownList ID="LanguageDropDownList" OnSelectedIndexChanged="LanguageDropDownList_OnSelectedIndexChanged"
data-native-menu="false" AutoPostBack="true" runat="server">
</asp:DropDownList>
答案 0 :(得分:0)
jQuery Mobile和asp.net网络表单从根本上不能协同工作。回发模型和jQuery Mobile的ajax表单加载和导航是不兼容的。转到MVC或关闭ajax。
确保在jQuery Mobile初始化之前调用此代码。 (在引用jQuery Mobile的标记之前包含它。)
<script src="jquery.js"></script>
<script>
$(document).bind("mobileinit", function() {
$.mobile.ajaxEnabled = false;
});
</script>
<script src="jquery-mobile.js"></script>
http://jquerymobile.com/demos/1.2.0/docs/api/globalconfig.html