我在我正在处理的wordpress网站上设置了javascript菜单
http://www.ogormanconstruction.co.uk/
我在菜单中创建了12个选项,但是当您点击其中任何一个选项时,虽然页面URL会相应更改,但它似乎不会从首页移动
<script type='text/javascript' src="/wp-content/themes/child/scripts/jquery-1.6.2.min.js"></script>
<script type='text/javascript' src="/wp-content/themes/child/scripts/jMaster.js"></script>
<script type='text/javascript' src="/wp-content/themes/child/scripts/supersleight.plugin.js"></script>
<script type="text/javascript" src="/wp-content/themes/child/scripts/hashchange.js"></script>
<script type="text/javascript" src="/wp-content/themes/child/scripts/actions.js"></script>
<script type="text/javascript" src="/wp-content/themes/child/scripts/tinyscroll.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-27552031-1']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['aspnetForm'];
if (!theForm) {
theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
<script type="text/javascript" src="http://include.reinvigorate.net/re_.js"></script>
<script type="text/javascript">
try {
reinvigorate.track("rq7v9-32hz0870n7");
} catch (err) { }
</script>
<script type="text/javascript">
//<![CDATA[
Sys.Application.initialize();
//]]>
</script>
</head>
<body <?php body_class(); ?>>
<div id="page" class="hfeed">
<header id="branding" role="banner">
<hgroup>
<div class="line"></div>
<h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1>
</hgroup>
<?php
// Check to see if the header image has been removed
$header_image = get_header_image();
if ( ! empty( $header_image ) ) :
?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
<?php
// The header image
// Check if this is a post or page, if it has a thumbnail, and if it's a big one
if ( is_singular() &&
has_post_thumbnail( $post->ID ) &&
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) ) ) &&
$image[1] >= HEADER_IMAGE_WIDTH ) :
// Houston, we have a new header image!
echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
else : ?>
<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
<?php endif; // end check for featured image or standard header ?>
</a>
<?php endif; // end check for removed header image ?>
<input type="hidden" name="ctl00$fldIsPublished" id="ctl00_fldIsPublished" />
<div id="header">
<ul id="nav">
<li class="clearfix">
<div class="clearfix">
<div id="menuNav"><a href="#" class="openNav">Menu</a></div>
<ul class='clearfix'><li><strong>O'Gorman Construction</strong><ul class='clearfix'><li><a href='/about-us'>About Us</a></li><li><a href='/work'>Work</a></li><li><a href='/recruitment'>Recruitment</a></li><li><a href='/contact'>Contact</a></li></ul></li><li><strong>Services</strong><ul class='clearfix'><li><a href='/site-logistics'>Site Logistics</a></li><li><a href='/waste-management'>Waste Management</a></li><li><a href='/security-services'>Security Services</a></li><li><a href='/traffic-management'>Traffic Management</a></li></ul></li><li><strong> </strong><ul><li><a href='/multi-service-gangs'>Multi Service Gangs</a></li><li><a href='/facilities-accomodation'>Facilities & Accomodation</a></li><li><a href='/small-works-maintenance'>Small Works & Maintenance</a></li><li><a href='/catering-services'>Catering Services</a></li></ul></li></ul>
</div>
</div>
</li>
</ul>
<a href="/" id="logo"></a>
</div>
<h2>Work</h2>
<div class="leftCol">
<div class="rightCol gallery">
<ul id="homeGallery">
<li id="prevControl"><a href="#">Previous</a></li>
<li id="galleryItems">
<ul>
<li>
<a class="projectLink" href='#' alt='Kirschner'></a>
<div class="galleryImage"><img src='/wp-content/themes/child/images/1.jpg' /></div>
<div class="galleryText"><div class="leftCol noborder" style="text-align: left;"><strong>Basingstoke Treatment Works</strong></div></div>
</li>
<li>
<a class="projectLink" href='#' alt='Loake'></a>
<div class="galleryImage"><img src='/wp-content/themes/child/images/2.jpg' /></div>
<div class="galleryText"><div class="leftCol noborder" style="text-align: left;"><strong>Project II</strong></div></div>
</li>
<li>
<a class="projectLink" href='#' alt='JTA'></a>
<div class="galleryImage"><img src='/wp-content/themes/child/images/3.jpg' /></div>
<div class="galleryText"><div class="leftCol noborder" style="text-align: left;"><strong>Project III</strong></div></div>
</li>
<li>
<a class="projectLink" href='#' alt='Umbro'></a>
<div class="galleryImage"><img src='/wp-content/themes/child/images/4.jpg' /></div>
<div class="galleryText"><div class="leftCol noborder" style="text-align: left;"><strong>Project IV</strong></div></div>
</li>
<li>
<a class="projectLink" href='#' alt='GrooveEffect'></a>
<div class="galleryImage"><img src='/wp-content/themes/child/images/5.jpg' /></div>
<div class="galleryText"><div class="leftCol noborder" style="text-align: left;"><strong>Project V</strong></div></div>
</li>
<li>
<a class="projectLink" href='#' alt='ohw?'></a>
<div class="galleryImage"><img src='/wp-content/themes/child/images/6.jpg' /></div>
<div class="galleryText"><div class="leftCol noborder" style="text-align: left;"><strong>Project VI</strong></div></div>
</li>
</ul>
</li>
<li id="nextControl"><a href="#">Next</a></li>
<li id="viewControl"><a href="#">View</a></li>
<li id="copyright">© O'Gorman Construction</li>
</ul>
</div>
</div>
</header><!-- #branding -->
<div id="main">
<form name="aspnetForm" method="post" action="Showcase.aspx?isLiveContent=true" id="aspnetForm">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTUx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2luYTEuanBlZwRHaW5hZAILD2QWAmYPFQUJcGV0ZXJzdG93CHZpZXctYWxsCVBldGVyc3RvdxYzNThfMDhfMjMyX3BldGVyNS5qcGVnCVBldGVyc3Rvd2QCDA9kFgJmDxUFBWFtaWthCHZpZXctYWxsBUFtaWthFjM1OV8xMF8xMTRfYW1pa2ExLmpwZWcFQW1pa2FkAg0PZBYCZg8VBQZkcm9weXgIdmlldy1hbGwGRHJvcHl4FzM2MF8xMV8xNjlfRHJvcHl4OC5qcGVnBkRyb3B5eGQCAw8WAh8ABQ8mY29weTsgU2l4IDIwMTJkZJmh+xCoh9ad16wiHcvEhbvQZgYZ" />
</div>
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['aspnetForm'];
if (!theForm) {
theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
<script type='text/javascript' src="/wp-content/themes/child/scripts/WebResource.js" type="text/javascript"></script>
<script type='text/javascript' src="/wp-content/themes/child/scripts/MicrosoftAjax.debug.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
//]]>
</script>
<script type='text/javascript' src="/wp-content/themes/child/scripts/MicrosoftAjaxWebForms.debug.js" type="text/javascript"></script>
<script type='text/javascript' src="/wp-content/themes/child/scripts/jsdebug.js" type="text/javascript"></script>
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAgK/z/SLBgKIvtqEDBhVLjfM03MtZyNTUwnapNYGvfxJ" />
</div>
<script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ctl00$ScriptManager1', document.getElementById('aspnetForm'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90);
//]]>
</script>
<script type='text/javascript' src="/wp-content/themes/child/scripts/re_.js"></script>
<script type="text/javascript">
try {
reinvigorate.track("rq7v9-32hz0870n7");
} catch (err) { }
</script>
<script type="text/javascript">
//<![CDATA[
Sys.Application.initialize();
//]]>
</script>
知道我缺少什么吗?
答案 0 :(得分:0)
在地址栏中包含新网址后,只需致电window.location.reload();
,即可转到该新网址。我不知道为什么当你将它转储到地址栏时它不会转到新的URL,因为我没有查看你的所有代码来查看你在哪里/如何做。如果您更改将url
设置为window.location.href = "http://new.url.com/"
的方式,则应立即加载该网址。