I am trying to install this script over here: https://www.jqueryscript.net/slider/Basic-Content-Carousel-Slider-Plugin-With-jQuery-gaBasicSlider.html
I don't know much about jquery, however, I tried to followed the instructions as best I could.
On step 3 of the instructions they say to initialize the plugin with this code:
$(document).ready(function(){
$('#example').gaBasicSlider();
});
And that these settings are available to use:
// 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
So my questions is, how do I use the settings above? I tried doing something like this, but then the settings doesn't seem to take effect. Am I doing it wrong? See below:
$(document).ready(function(){
$('#example').gaBasicSlider();
animationDelay: 2000,
animationTime: 100,
});
Did I use the settings in the correct place? Or is it supposed to be a seperate function or something?
Like this:
$('#example').gaBasicSlider({
btnNext : $('#example-next'),
btnPrevious : $('#example-previous'),
indicators : $('#example-indicators'),
animate: false
});
https://gregartist.github.io/ga-basic-slider/
According to the documentation it looks like you pass it an object at creation with the values you want
$(document).ready(function(){
$('#example').gaBasicSlider({
animationDelay: 200,
animationTime: 100
});
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.