如何让jQuery / JavaScript在网站上运行?

时间:2015-07-22 23:29:50

标签: javascript jquery html

我正在尝试使用此代码:http://codepen.io/chrisgrabinski/pen/JhnBl但由于某种原因,.js文件不希望正确加载。

这是我目前在HTML头中的内容:

<link rel="stylesheet" type="text/css" href="css/landing.css">
<script src="js/jquery.min.js"></script>
<script src="js/landing.js"></script>

这就是我的landing.js文件的样子:

function toggleScroll() {
  $('.start-login, .start-signup').toggleClass('active');
  //$('html, body, .section-start').animate({
  //  scrollTop: 0
  //}, 200);
}

$('.btn-signup, .btn-back-login').click(function() {
  toggleScroll();
});

$('.btn-signup, .btn-back-login').on('touchstart', function(event) {
  event.stopPropagation();
  toggleScroll();
});

您可以在前面提到的链接中找到其余代码。

感谢您的帮助。

0 个答案:

没有答案
相关问题