Hello, I'm looking for some assistance with the code snippet provided below. My goal is to call the function doTheSlide()
from within the slide event function in JavaScript. However, I seem to be struggling with understanding scope in JS.
Could someone guide me on the correct way to achieve this? Currently, I am encountering an error message:
Uncaught TypeError: object is not a function
(function($) {
bindEvent = function(slider) {
slider.bind('slide', function(event, ui) {
doTheSlide(ui.value);
});
}
doTheSlide = function(value) {
//Animate the slide
}
})(jQuery);