开发者

What code runs when I click on an individual tab in jQuery?

开发者 https://www.devze.com 2023-03-30 12:39 出处:网络
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 y

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号