I have a scrollable image script that I would like to update the scroll speed on the fly using the hover function. I researched and just can't figure out how to get a variable to update inside a function without calling the function again. I don’t want this to start, I just want the speed to increase as it starts.
(function ($) {
$(function () {
var defspeed = 1;
$(".simply-scroll-list").simplyScroll({
speed: defspeed,
});
});
})(jQuery);
$('.fast-forward').hover(function () {
var defspeed = 5;
});
As you can see above, I do not know how to integrate these two blocks of code correctly.
source
share