Jquery Tabs - Using Inernal URL links

Jquery Tabs - Using Inernal URL links

I'm using Jquery mobile in my website and tabs navigating didn't work well when adding URL in tab instead a #div tag. I need to change the tab on swipe event.

<div data-role="tabs" id="tabs">
<div data-role="navbar">
<ul>
<li>
<a href="#one" class="ui-btn-active" data-ajax="false" data-href="#">ONLINE</a>
</li>
<li>
<a href="#two" data-ajax="false" data-href="#">SPECS</a>
</li>
<li>
<a href="another-page.html" data-ajax="false" data-href="#">LOCAL</a>
</li>
</ul>
</div>

<div id="one"></div>
<div id="two"></div>

Jquery code for Swipe
$(".ui-tabs-panel > :not(.no-swipe)").on("swiperight swipeleft", function (e) {
        var active = $("#tabs").tabs("option", "active");        
        if (e.type === "swiperight") {
            $("#tabs").tabs("option", "active", active - 1);
           
        }
        else {
            $("#tabs").tabs("option", "active", active + 1);           
        }
    });