Is there a way to reload the selected tab I know there is the .load() function. But it wants a tab index and I don’t seem to see a way to grab the selected tabs id.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Update: In jQuery 1.9, the
selectedoption is renamed toactive. See attomman’s answer.To get the currently selected index, use the
tabs('option','selected')function.E.g, if you have a button
#button(and the#tabselement is made into tabs) where you want to get the index, do the following:Here’s a demo: http://jsfiddle.net/sVgAT/
To answer the question indicated by the title, in jQuery 1.8 and earlier, you would do:
And in jQuery 1.9 and later, you would do: