开发者

In jquery modal view idtab link is not working

开发者 https://www.devze.com 2023-03-28 23:05 出处:网络
If I add idtab in main page it works fine. But when I add idtab in modal window, all the tab entries are showing and clicking on link doesn\'t work.

If I add idtab in main page it works fine. But when I add idtab in modal window, all the tab entries are showing and clicking on link doesn't work.

Its sample code I tested. Can you point me to what I am doing incorrectly here.

var str = $("<div id="divid" class="panel">' +
        '<div class="panelname"><span class="panellabel">Header</span></div>' +
            '<ul class="idTabs"><li><a href="#jquery">jQuery</a></li><li><a href="#official">Tabs 3</a></li></ul>' +
            '<div id="jquery">JQUERY TAB</div><div id="official">NEXT TAB</div>' +
        '</div>');

this.append(str);
    str.jqm({modal:true,overlay: 0});
    str.jqmShow();
    str.draggable(开发者_StackOverflow社区);

    $('#divdiv').idTabs();


You didn't provide a ton of detail, but it sounds like the problem you are having is that idtabs initializes the tabs in the main content area automatically when the page is finished loading, but since the idtabs don't yet exist in the modal window, they aren't automatically initialized. I'm pretty sure this is the plugin you're referring to - http://www.sunsean.com/idTabs/ , and if that's the case, you simply need to call the initialization function on the tabs that get inserted into the modal window after the modal is opened.

$("."+idTabs).idTabs();
0

精彩评论

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