JQuery: which element was clicked?
- by centr0
I have a list with links. These links are links to tables on the same page. What I want to do is whatever link I click in the list it will show its corresponding table and hide all the others.
Without adding a different id/class to each link in the list and its corresponding table, is there a way to find out which element was clicked and show() its table?
From what I understand JQuery returns an array object on its selector. How can I find out what element of the array was clicked?
I've tried to use event.which but I'm a little lost.
Help is greatly appreciated!