What code runs when I click on an individual tab in jQuery?
When I click on a tab in a web page that uses jQuer开发者_高级运维y-UI-tabs, what code is run to actually switch from one tab to another?
On click on any jQuery UI tabs, select
event is triggered. If you want you can use this event and write your logic in it.
$(".selector").tabs({
select: function(event, ui) {
//Write your code here
}
});
You can use Chrome Dev Tools or Firebug to step through each executed function. That may not be necessary as it's just a piece of code that toggles some display
attributes of elements in a list.
You should download the uncompressed version of jQuery UI and analyse the Tabs part yourself.
精彩评论