I have the following script:
$(function () {
var tabContainers = $('div.tabs > div');
tabContainers.hide().filter(':first').show();
$(window).bind('hashchange', function () {
var hash = window.location.hash || '[b][b]#[/b][/b]first';
tabContainers.hide();
tabContainers.filter(hash).show();
$('div.tabs ul.tabNavigation a').removeClass('selected');
$('a[hash=' + hash + ']').addClass('selected');
});
$(window).trigger( "hashchange" );
});
<div class="tabs">
<ul class="tabNavigation">
<a href="#first" class="selected">First</a>
<a href="#second" class="">Second</a>
<a href="#third" class="">Third</a>
</ul>
<div id="first" style="display: block;">
<h2>First</h2>
</div>
<div id="second" style="display: none;">
<h2>Second</h2>
</div>
<div id="third" style="display: none;">
<h2>Third</h2>
</div>
</div>
How do i replace [b]#[/b] with [b]?[/b], so that it would be http://site.com/?first