jQuery UI non ajax tab loading whole website into itself?

前端 未结 7 1943
灰色年华
灰色年华 2021-02-07 03:00

Having a large problem with jQuery Tabs.

Im trying to load the tabs on my sites product page... When the page loads i see that tabs content for a second (standard html t

7条回答
  •  自闭症患者
    2021-02-07 03:32

    Angelica had the answer that worked for me. I used this in a requirejs file for any page with the class 'tabs' as the selector for the tabs.

    jQuery(".tabs ul li a").each(function() {
        jQuery(this).attr("href", location.href.toString()+jQuery(this).attr("href"));
    });
    jQuery(".tabs").tabs();
    

提交回复
热议问题