Jerome Ansia Jerome Ansia - 4 months ago 20
jQuery Question

jQuery UI tabs, update url when clicking on a different tab

I'm using the tabs of jQuery UI:

How to update the current url of the browser when the user click on a different tab by adding the anchor link to it:
ex: url.html#tab-4 and pushing the current history of the browser at the same time.

Thank you!


This should get what you want. I used the sample html in jquery ui demos

        $( "#tabs" ).tabs({
            select: function(event, ui) {                   
                window.location.hash =;