jquerytools/jquerytools — Issue #664: tabs - wizard - strange behaviour of api.click
Author: entio
Created: 2012-02-16 03:00:19+00:00
State: open

Hi,
Im playing around tabs wizard, prepared minimal setup for testing.

What i want to achieve?
Clicking next btn checks radio btns and then redirects yout to another tab depending on radio selection.

What's wrong?
after clicking next tabs switches according to radio selection, but then immediately changes back to 1st.

My js code:
$("button.next", wizard).click(function() {
switch(api.getIndex())
{
case 0:
case 1:
case 2:
case 3:
if($(":checked").val()=="r1")
{
api.click(1);
}
else if($(":checked").val()=="r2")
{
api.click(2);
}
break;
}
});

Preview address:
http://onlinedesign.com.pl/_STRONY_WWW/ATGmedia/testform.html

note you have to select any of radios and also check the "i accept these..." checkbox