I’m trying to display different data based on the click of different th elements of a table. I’m using jQuery 1.7
But I dont know why this is not working??
what i want is that when user click on specific th then the table which have the class of that th id shoud display and other tables must be hidden at that time..
Here is my fiddle and please helps me out.
http://jsfiddle.net/78UKh/3/
Note : Please dont suggest other ways around, because I have written a lot of jquery code already in that page.
Thanks
Instead of using:
Use a filter:
Or within 1 selector
hasClasschecks if the table has a class, which returns a boolean. Thefilterfunction filters between te current results.Live demo: http://jsfiddle.net/78UKh/4/