Hi Guys, I am new to Jquery and this forum.
I'm wondering if any of you could help me? I am modifying an gallery script called slideSwitch. I want to set the interval value by a variable. For example, If I click button 1 the interval value is 5000 and If I click button 2 - the interval value is 2000 etc. Do I need to pass the value somehow? I might be totally off track here.. All help is appreciated.
My code so far:
function log(x) {
return x;
}
$(document).ready(function(){
$("button.1").click(function(){
var $logval=(log(5000));
});
$("button.2").click(function(){
var $logval=(log(2000));
});
});
setInterval( "slideSwitch()", $logval );
-----HTML-----
<button class="1">1 Button</button>
<button class="2">2 Button</button>