我决定使用HTML5up模板(Verti => here)作为客户端WordPress主题的基础。客户端需要我提前部署,所以网站是live => here。侧面导航不适用于IOS / safari或iPhone上的Chrome。这些是唯一有问题的浏览器
以下是页脚中调用的javascript:
$('.banner').unslider({
arrows: true,
fluid: true,
dots: true,
fade:true
});
// Find any element starting with a # in the URL
// And listen to any click events it fires
$('a[href^="#"]').click(function() {
// Find the target element
var target = $($(this).attr('href'));
// And get its position
var pos = target.offset(); // fallback to scrolling to top || {left: 0, top: 0};
// jQuery will return false if there's no element
// and your code will throw errors if it tries to do .offset().left;
if(pos) {
// Scroll the page
$('html, body').animate({
scrollTop: pos.top,
scrollLeft: pos.left
}, 1000);
}
// Don't let them visit the url, we'll scroll you there
return false;
});
$("#mygallery").justifiedGallery({
rowHeight : 160
});
这是导航:
<div id="header-wrapper">
<header id="header" class="container">
<!-- Logo -->
<div id="logo">
<h1><a href="index.html">Culinary Craft</a></h1>
<span>Catering Co.</span>
</div>
<!-- Nav -->
<nav id="nav">
<ul>
<li class="current"><a href="<?php echo get_site_url(); ?>">Home</a></li>
<li>
<a href="<?php echo get_site_url(); ?>/our-services/">Services</a>
<ul>
<li>
<a href="<?php echo get_site_url(); ?>/our-services/">Services</a>
<ul>
<li><a href="<?php echo get_site_url(); ?>/our-services">Catering</a></li>
<li><a href="<?php echo get_site_url(); ?>/liquid-catering">Liquid Catering</a></li>
<li><a href="<?php echo get_site_url(); ?>/corporate-events">Weddings and Corporate Events</a></li>
</ul>
</li>
<li><a href="<?php echo get_site_url(); ?>/planning">Planning</a></li>
<li><a href="<?php echo get_site_url(); ?>/execution">Execution</a></li>
<li><a href="<?php echo get_site_url(); ?>/menus">Menus</a></li>
</ul>
</li>
<li><a href="<?php echo get_site_url(); ?>/about">About</a>
<ul>
<li><a href="<?php echo get_site_url(); ?>/why-culinary-craft">Why Culinary Craft?</a></li>
<li><a href="<?php echo get_site_url(); ?>/about">Our Executive Team</a></li>
<li><a href="<?php echo get_site_url(); ?>/frequently-asked-questions">Frequently Asked questions</a></li>
<!--<li><a href="<?php echo get_site_url(); ?>">Orange County</a></li>-->
</ul>
</li>
<li><a href="<?php echo get_site_url(); ?>/contact">Contact</a></li>
</ul>
</nav>
</header>
</div>
我正在试图找出导航无法工作的原因,但仅针对这些特定的浏览器。