放大弹出jquery样式

放大弹出jquery样式,jquery,mobile,popup,magnific-popup,Jquery,Mobile,Popup,Magnific Popup,我使用放大弹出窗口加载一个php页面,但一旦页面打开,其中的选择器就不会选择jquerymobile样式,只显示为常规输入选择器。 我通过以下方式加载php页面: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="viewport" content="width=

我使用放大弹出窗口加载一个php页面,但一旦页面打开,其中的选择器就不会选择jquerymobile样式,只显示为常规输入选择器。 我通过以下方式加载php页面:

<!DOCTYPE html>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="viewport" content="width=device-width">

<link href="../../jquery.mobile-1.3.1.min.css" rel="stylesheet">
<script src="../../jquery-1.10.1.min.js"></script>
<script src="../../jquery.mobile-1.3.1.min.js"></script>

<!-- magnific popup -->
<link href="../../magnific-popup.css" rel="stylesheet" />
<script src="../../magnific_popup.js"></script>

<script>
$.mobile.loadingMessage = false;
</script>


</head>
<body>

<div data-role="page" id="home" data-theme='a'>    
         $.magnificPopup.open({
                closeOnContentClick:false,
                closeOnBgClick:false,
                    items: {
                        src: '../../test-ajax.php
                  },
                  type: 'ajax'  }, 0);
                  }

$.mobile.loadingMessage=false;
$.magnificPopup.open({
closeOnContentClick:false,
closeOnBgClick:false,
项目:{
src:'../../test-ajax.php
},
类型:“ajax'},0);
}

在test-ajax.php页面中,我有:

<html><head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252"></head>
<body><div id="custom-content" class="mfp-bg style="max-width:100%; margin: 20px 
auto;">
    <style>
    #custom-content img {max-width: 70%;margin-bottom: 10px;}
    </style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="viewport" content="width=device-width">
</head>

<body>

    <select name="test" id="test" onChange="ReadForm (this, false);">
                                <option value="a">yadayada</option>
                                <option value="b">yadayada</option>
</select>
</body></html>

来自jQM文档

如果通过JavaScript操作select,则必须调用刷新 方法更新视觉样式。以下是一个例子:

或者在需要由JQM处理的元素上触发此操作。文档准备好后,JQM将处理所有元素,即当页面加载时,您将在此之后启动此弹出窗口,因此您必须明确地告诉JQM处理此代码

刷新应该在magnificpoop将代码插入DOM后完成,检查它们提供的回调。我自己也没用过放大镜


还要检查并确保您遵循他们关于如何使用
select
jQM方式的指导原则

在放大弹出窗口中尝试了你的建议,但没有结果。打开:function(){var myselect=$(“选择#测试”);myselect.selectmenu(“刷新”);},
var myselect = $("select#test");
myselect.selectmenu("refresh");