Nested jQuery tabs

前端 未结 3 1602
耶瑟儿~
耶瑟儿~ 2021-01-21 17:29

I\'m new to jQuery (a couple of weeks). I\'m trying to nest the jQueryUI tab control. It works fine until the nested tabs are in an external file then I get an exception thrown

3条回答
  •  灰色年华
    2021-01-21 17:38

    If you are fetching the inner tabs through ajax, don't include a full html document and jquery, everything is being redefined in javascript and is conflicting.

    Simply remove the whole head, body, and html wrapper tags leaving the , and it should work.

    You also need to redefine the tabs when they it is loaded. Add a callback to the ajax tabs function -- (something like function ontabAJAX(){ if ($('.tab .active .innertabs').length)){ $('.tab .active .innertabs').removeClass('innertabs').addClass('tabbed').tabs() }).

提交回复
热议问题