Tab Two Main
Tab Three Main
I\'m a jQuery noob and I\'m trying to figure out how to trap the tab selected event. Using jQuery 1.2.3 and corresponding jQuery UI tabs (not my choice and I have no control
This post shows a complete working HTML file as an example of triggering code to run when a tab is clicked. The .on() method is now the way that jQuery suggests that you handle events.
jQuery development history
To make something happen when the user clicks a tab can be done by giving the list element an id.
-
Then referring to the id.
$("#list").on("click", function() {
alert("Tab Clicked!");
});
Make sure that you are using a current version of the jQuery api. Referencing the jQuery api from Google, you can get the link here:
https://developers.google.com/speed/libraries/devguide#jquery
Here is a complete working copy of a tabbed page that triggers an alert when the horizontal tab 1 is clicked.
TabDemo
jQuery UI Tabs Styling
Tab Two Main
Tab Three Main