我创建了一个使用滚动滑动效果的功能,当我点击它向下滑动的链接然后转到那个div但是当我们点击菜单从右向左滑动导航时我还放置了另一个用于滑动导航栏的库菜单打开,但问题是两个都不工作,如果我删除幻灯片菜单库,页面滑动效果工作正常,但当我添加幻灯片菜单库,它停止如何使两个运行?
//main.js which is using sliding page effect pparallax we say i beleive them
$(document).ready(function(){
// Add smooth scrolling to all links
$("a").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash
var hash = this.hash;
// Using jQuery's animate() method to add smooth page scroll
// The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
$('html, body').animate({
scrollTop: $(hash).offset().top
}, 800, function(){
// Add hash (#) to URL when done scrolling (default click behavior)
window.location.hash = hash;
});
} // End if
});
});
这是我放置图书馆的页脚
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.2.min.js"><\/script>')</script>
<script src="js/bootstrap.min.js"></script>
<script src="js/BootSideMenu.js"></script>//if this is removed everything is working fine
<script src="//maps.google.com/maps/api/js?sensor=true"></script>
<script src="js/main.js"></script>
<script>
$(document).ready(function(){
$('#navigation').BootSideMenu({side:"right"});
});
</script>
请任何人帮助我,我的英语有点不好,对不正确的时态抱歉:)
谢谢