I'm trying to make my tabbed content open on a specific tab by changing the URL. I remember seeing something like this before but can't seem to find it!
Here's the fiddle I created: http://jsfiddle.net/sW966/
Currently, the default tab is tab 1. However, I'm wondering if it's possible to make tab 2 open if the URL is http://jsfiddle.net/sW966/#tab-2
?
Any help would be greatly appreciated as I'm having a bit of trouble with this :)
$(document).ready(function () {
$(".tab").click(function () {
$(".tab").removeClass("active");
$(this).addClass("active");
$("#tabbed-content .tab-content").hide();
$($(this).attr("href")).show();
});
});