我目前正在学习jQuery.我在使用以下代码时遇到了一些问题.我试图让我的网站使用一些按钮移动,但一旦我点击它们似乎不起作用.下面是我的jquery代码.
jQuery(document).ready(function ($) {
//initialise Stellar.js
$(window).stellar();
//Cache some variables
var links = $('.navigation').find('li');
slide = $('.slide');
button = $('.button');
mywindow = $(window);
htmlbody = $('html,body');
//Setup waypoints plugin
slide.waypoint(function (event, direction) {
//cache the variable of the data-slide attribute associated with each slide
dataslide = $(this).attr('data-slide');
//If the user scrolls up change the navigation link that has the same data-slide attribute as the slide to active and
//remove the active class from the previous navigation link
if(direction === 'down') …Run Code Online (Sandbox Code Playgroud)