Monday, 26 August 2013

How to execute a function in a function

How to execute a function in a function

I have this jQuery Plugin that looks like this:
(function($){
$.fn.s3Slider = function(vars) {
// (...)
timeOutFn = setTimeout(makeSlider, thisTimeOut);
// (...)
var makeSlider = function() {
// next Image
}
makeSlider();
};
})(jQuery);
I can start it with
jQuery(document).ready(function() {
jQuery('#s3slider').s3Slider({
timeOut: 4000
});
});
Now my question, how can I execute the makeSlider() function from outside?
It's an Image Slider and I want to add a Next Button function.
I want something like this, but it's wrong
jQuery.s3Slider.makeSlider();

No comments:

Post a Comment