tabs .click()
tabs .click()
I'm trying to execute a method when any tab inside of
#tabs is clicked, could someone tell me what I am doing wrong?
- $('#tabs li').click(function()
- {
- alert('clicked');
- });
Given the following html
- <div id="tabs">
- <ul>
- <li><a href="#tabs-1">Tab 1</a></li>
- <li><a href="#tabs-2">Tab 2</a></li>
- </ul>
- <div id="tabs-1"><p>Tab1 Stuff</p></div>
- <div id="tabs-2"><p>Tab2 Stuff</p></div>
- </div>
Thanks