Tablepress和模式窗口


Tablepress and modal window

下面是我在headers.php上使用wordpress编写的代码。我还使用了十三主题和tablepress插件。

<link rel="stylesheet" href="js/jquery-ui.css" />
<script type="text/javascript src="js/jquery-1.9.1.js"></script>
<script type="text/javascript src="js/jquery-ui.js"></script>
<script type="text/javascript src="js/dist/html5shiv.js"></script>
<script type="text/javascript">
$(function() {
$( "#dialog103" ).dialog({
  autoOpen: false,});
$("#103" ).click(function() {
  $( "#dialog103" ).dialog( "open" );
});
});
</script>
<div id="dialog103" title="SECTION 103. Scope and Application">
<p><strong>(a)</strong>The provisions of this Code shall apply..<br></div>

在tablepress第1列第1行的单元格中,我有这个。

<button  id="103">NBC SECT 103</button> 

当我点击按钮时,什么也没发生。id#dialog103上的文本也出现在我的网页顶部。这应该在模态载荷内容上。

感谢

根据Codex"WordPress中包含的jQuery库设置为noConflict()模式"。为了让你的代码工作,用包装它

jQuery(document).ready(function($) {
    // Inside of this function, $() will work as an alias for jQuery()
});