Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello All, I have a function with a jQuery slider. It sets up a delay time and s

ID: 3536121 • Letter: H

Question

Hello All,

I have a function with a jQuery slider. It sets up a delay time and shows it in the "#slider" div :

$(function () {
$("#slider").slider({
range: 'max',
min: 1,
max: 5,
slide: function(event,ui) {
$("#delayTime").val(ui.value);


delayTime = ui.value * 1000;
}
});
});

This works OK by itself.

Later in the code I have another function which runs the whole slideshow.
That function has its own parameter which determines a delay time between each slide:
function mySlideshow(){
var wholeSlideshow =
$('#thumbHolder').galleryWithSlideshow({
mainCntrls: true,
prevNextCntrls: true,


delayTime: 2000,


mainBtnTxtPlay: 'PLAY',
mainBtnTxtStop: 'STOP',


etc.

});

This one works perfectly fine by itself too.

Question.

What should I add to the code to pass the value I get in the slider function
into the slideshow function's delayTime parameter so the slider function would determine the
delayTime in the slideshow function?

I would greatly appreciate your help.

Explanation / Answer

u have to call slideshow function in the slider function with argument as delaytime ,,,,and also where u are defining slideshow function addparameter delaytime

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote