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:

<script>
$(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');
	});
});
</script>

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 comment on “jQuery UI tabs update browser location

Leave a Reply

Your email address will not be published. Required fields are marked *