jQuery ui tabs load/tabsload event does not fire

前端 未结 1 1190
旧时难觅i
旧时难觅i 2021-01-25 11:08

This seems to be the same as my question: jquery ui tabs load event does not fire

but the solution provided doesn\'t work for me.

my code:



        
1条回答
  •  旧巷少年郎
    2021-01-25 11:44

    The load handler is only for tabs that are loaded via ajax. To do what you want to do, you'll need to attach a load handler to the iframe element:

    
    
    
    

    Note however that your iframe might load before someone has the chance to click on the tab. That may be what you want. If you want to just trigger something when a tab is selected, use the tabsselect event:

    $( ".selector" ).bind( "tabsselect", function(event, ui) {
      ...
    });
    

    0 讨论(0)
提交回复
热议问题