下面是我正在使用并且一直有效的脚本,但是最近在我的wordpress网站中,dreamweaver正在将结束标记视为不正确?我的所有标记都在下方吗?
我没有改变任何东西,但现在它正在播放,我无法解决问题?
<script>
$j = jQuery.noConflict();
// perform JavaScript after the document is scriptable.
$j(document).ready(function() {
// setup ul.tabs to work as tabs for each div directly under div.panes
$j("ul.tabs").tabs("div.panes > div#panel");
});
</script>
整个代码页:
<div class="footer">
<p>
<ul class="details">
<li><span><b>© Uni Compare Ltd</b></span></li>
<li><span><a href="http://universitycompare.com/terms-and-conditions/">Terms and conditions</a></span></li>
</ul>
<ul class="socialnav">
<li><span><a href="http://ucas.com/"><img alt="UCAS" src="/wp-content/themes/blue-and-grey/images/addedimages/ucas_soc.png" /></a></span></li>
<li><span><a href="https://twitter.com/#!/unicompare"><img alt="Twitter" src="/wp-content/themes/blue-and-grey/images/addedimages/twitter_soc.png" /></a></span></li>
<li><span><a href="http://www.facebook.com/pages/University-Compare/197132243631509"><img alt="Facebook" src="/wp-content/themes/blue-and-grey/images/addedimages/facebook_soc.png" /></a></span></li>
</ul>
</div>
<div id="btmlinks">
<ul>
<li><b>Site links</b></li>
<li><a href="<?php echo home_url(); ?>">Home</a></li>
<li><a href="<?php echo home_url(); ?>/university-guide/">University guide</a></li>
<li><a href="<?php echo home_url(); ?>/student-info/">Student Information</a></li>
<li><a href="mailto:letstalk@universitycompare.com?subject=Advertisement%20Enquiry">Contact for Advertisement</a></li>
<li><a href="mailto:info@universitycompare.com">Contact us</a></li>
<li style="text-indent:-9999px;">University Compare - Your future online</li>
</ul>
<ul>
<li><b>Top universities</b></li>
<li><a href="<?php echo home_url(); ?>/university-guide/cambridge-university">Cambridge, University of</a></li>
<li><a href="<?php echo home_url(); ?>/university-guide/university-of-oxford/">Oxford, University of</a></li>
<li><a href="<?php echo home_url(); ?>/university-guide/london-school-of-economics/">London School of Economics</a></li>
</ul>
<ul>
<li><b>Our Partners</b></li>
<li><a href="http://stustu.co.uk">Stustu.co.uk</a></li>
<li><a href="http://www.purepotential.org/">Pure Potential</a></li>
<li><a href="#"></a></li>
</ul>
</div>
<!-- UC UNI PAGE CSS TABS SCRIPT -->
<script>
$j = jQuery.noConflict();
// perform JavaScript after the document is scriptable.
$j(document).ready(function() {
// setup ul.tabs to work as tabs for each div directly under div.panes
$j("ul.tabs").tabs("div.panes > div#panel");
});
</script>
<?php wp_footer(); ?>
<!-- Main Page Table Sorted -->
<script type="text/javascript" src="<?php echo home_url(); ?>/wp-content/themes/blue-and-grey/js/jquery.tablesorter.min.js"></script>
<?php if (is_page( array(2502, 15))) : ?>
<!-- JavaScript includes -->
<script type="text/javascript" src="<?php echo home_url(); ?>/wp-content/themes/blue-and-grey/assets/countdown/jquery.countdown.js"></script>
<script type="text/javascript" src="<?php echo home_url(); ?>/wp-content/themes/blue-and-grey/assets/js/script.js"></script>
<?php endif; ?>
</body>
</html>
我添加了整个页面脚本,奇怪的是,当我在开始脚本标记之前放置一个结束脚本标记时,它似乎被视为正常,并且Dreamweaver不会将其视为一个问题。
答案 0 :(得分:0)
在整个代码页中,您有一个<p>
段落标记,位于<div class="footer">
下方。您从未使用</p>
关闭该段落。
您可以在</p>
之前使用</div>
关闭它,但不能在<ul> </ul>
或
删除开头<p>
代码。
您上面发布的脚本对我来说似乎不错。