jQuery UI tabs update browser location

When you click some tab, the browser url-location is not updated and user cannot have the link to the current tab.

This bug is fixed with such code:


$(function(){

	$('.tabs').tabs(); // tabs init

	$('.ui-tabs ul.ui-tabs-nav li a').click(function () { // add hash to the location for having link to selected tab

		location.hash = $(this).attr('href');

	});

});

This was submitted as a bug but it wont be fixed because "This should be done outside of the plugin to accommodate the application-specific hash tracking".

Solution found on zachstronaut site;

1 thought on “jQuery UI tabs update browser location”

Leave a Comment