I am using jquery tab UI for creating my tabs. I hided span tag with unique value in each tabs. I would like to find span tag with values with the particular tab index.
Example::
If there is a two tabs tab1 and tab2. In tab1 i hide value ‘1’ and in tab 2 value ‘2’. Now i want to search in all tabs and find 1 and return the index number in this case it will be 0. Then it will open that tab with the index ‘0’.
I can use jquery contain function for searching thorugh list but i just wonder how can i return the particular index of tab when the match found.
Any help would greatly appreciate.
Thanks
But basically you can use the
$.each()method (jQuery .each() API).Within the function arguments, the
istands for the index, which you can loop through.jsFiddle DEMO