jQuery - trapping tab select event

前端 未结 7 1998
予麋鹿
予麋鹿 2020-12-03 04:50

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

7条回答
  •  一个人的身影
    2020-12-03 05:13

    it seems the old's version's of jquery ui don't support select event anymore.

    This code will work with new versions:

    $('.selector').tabs({
                        activate: function(event ,ui){
                            //console.log(event);
                            console.log(ui.newTab.index());
                        }
    });
    

提交回复
热议问题