Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/427.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 正在尝试了解如何安装此jquery脚本_Javascript_Jquery - Fatal编程技术网

Javascript 正在尝试了解如何安装此jquery脚本

Javascript 正在尝试了解如何安装此jquery脚本,javascript,jquery,Javascript,Jquery,我正在尝试在此处安装此脚本: 我对jquery了解不多,但是,我尽力按照说明进行操作 在说明的第3步中,他们说用以下代码初始化插件: $(document).ready(function(){ $('#example').gaBasicSlider(); }); 并且这些设置可供使用: // enable auto rotation animate: true, // animation delay time animationDelay: 6000, // animat

我正在尝试在此处安装此脚本:

我对jquery了解不多,但是,我尽力按照说明进行操作

在说明的第3步中,他们说用以下代码初始化插件:

$(document).ready(function(){         
  $('#example').gaBasicSlider();
});
并且这些设置可供使用:

// enable auto rotation
animate: true,
// animation delay time
animationDelay: 6000,
// animation duration time
animationTime: 300,
// CSS selector for custom indicator
indicators: null,
// CSS selector for custom next button
btnNext: null,
// CSS selector for custom previous button
btnPrevious: null
所以我的问题是,我如何使用上面的设置?我尝试过这样做,但是设置似乎没有效果。我做错了吗?见下文:

$(document).ready(function(){         
      $('#example').gaBasicSlider();
     animationDelay: 2000,
     animationTime: 100,
    });
我是否在正确的位置使用了设置?或者它应该是一个单独的函数还是什么?

像这样:

$('#example').gaBasicSlider({
  btnNext : $('#example-next'),
  btnPrevious : $('#example-previous'),
  indicators : $('#example-indicators'),
  animate: false
});
像这样:

$('#example').gaBasicSlider({
  btnNext : $('#example-next'),
  btnPrevious : $('#example-previous'),
  indicators : $('#example-indicators'),
  animate: false
});

根据文档,看起来您在创建时向其传递了一个具有所需值的对象

$(document).ready(function(){         
  $('#example').gaBasicSlider({
    animationDelay: 200,
    animationTime: 100
  });
});

根据文档,看起来您在创建时向其传递了一个具有所需值的对象

$(document).ready(function(){         
  $('#example').gaBasicSlider({
    animationDelay: 200,
    animationTime: 100
  });
});