Skip to content Skip to sidebar Skip to footer

Jquery Ui Tabs With Base Href And Query String Doesn't Work

The jQuery ui tabs is working for me but when I place a query string behind it, it will load in the base href content. Maybe i'm not understanding the correct behaviour of base hre

Solution 1:

Hey it's horrible but you can try this

$(function () {
    var rquery = /\?[^#]*/;
    $("#tabs").find("a").each(function() {
        this.setAttribute("data-orig-href", this.href);
        this.href = this.href.replace( rquery, "" );
    });

    $("#tabs").tabs();
});

Here's a fiddle to show it working.

Post a Comment for "Jquery Ui Tabs With Base Href And Query String Doesn't Work"