我编写了一个基本的管理顶层插件,它有一个子菜单,驱动一个php表单,其中有一个从wp\\U数据库填充的网格表(来自其中的自定义表“分支”)。
我的安装是WAMPServer上的一个干净的WP 3.3.1。只有在2010年和2011年主题的头文件中,才在中包含wp\\u head函数之前的更改。
我尝试使用JQuery文档。“ready”不起任何作用。所以我假设我有一个Jquery设置问题。如有任何建议/帮助,将不胜感激。(我也尝试过使用JQueryUI对话框-模式-表单,但zilch、nada等也会在页面中显示“弹出div”,而不会显示“弹出”)。
下面是我的表单和Jquery函数。
<div class="wrap" id="main">
<form name="Sandwich Baron Branch Maintenance" method="post" action="<?php echo str_replace( \'%7E\', \'~\', $_SERVER[\'REQUEST_URI\']); ?>">
$(document).ready(function(){
alert("We\'re in Jquery world");
$(\'#form-wrap\').dialog({
autoOpen: false, //FALSE if you open the dialog with, for example, a button click
title: \'My Form\',
modal: true
});
});
这里是它引用的#form wrap div<div id="form-wrap " title="Branch Editing">
<p class="validateTips">All form fields are required.</p>
<form>
<fieldset>
<label for="BrName">Branch Name</label>
<input type="text" name="txtBrname" id="txtBrName" class="text ui-widget-content ui-corner-all" />
<label for="Tel">Tel</label>
<input type="text" name="txtTel" id="txtTel" value="" class="text ui-widget-content ui-corner-all" />
</fieldset>
</form>
</div>