trying to check the selected tab index here. Not sure why my way is not
working but also wondering if I could use the "this" object? I know the
line to change the image works, because I've seen it change but can't get
the check for selected to work when I click on a tab so that only the right
image changes.
var selected = $('#tabs').tabs('option', 'selected');
$('#tabs').tabs().click(function() {
if (selected == 0) {
$('img#FormContenTab').attr({ src:
"/Content/Images/Product/tabset1_per_on.gif" });
}
else if (selected == 1) {
$('img#imgOtherTab').attr({ src:
"/Content/Images/Product/tabset3_other_on.gif" });
}
else if (selected == 2) {
$('img#imgRaTab').attr({ src:
"/Content/Images/Product/tabset4_re_on.gif" });
}
});
--
View this message in context:
http://www.nabble.com/Check-of-selected-jQuery-tab-tp22912148s27240p22912148.html
Sent from the jQuery UI Discussion mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---