How do I switch to a new jQuery UI tab programmatically?

后端 未结 5 793
闹比i
闹比i 2020-12-15 15:44

I am building a \"check-out\" like interaction with jQuery UI tabs. This means that the click of a button on the first tab will deactivate the first tab and move to the next

5条回答
  •  情话喂你
    2020-12-15 16:07

    $(function() {
        $( "#tabs" ).tabs({ activate: function(event ,ui){
            //console.log(event);
            //alert(  ui.newTab.index());
            //alert( ui.newTab.attr('li',"innerHTML")[0].getElementsByTagName("a")[0].innerHTML);
    
            alert( ui.newTab[0].getElementsByTagName("a")[0].innerHTML);
            //alert( this.text);
        } });
    });
    

提交回复
热议问题