how to keep same tab highlighting after refreshing the page(page is refreshed after the paging link clicked.)
<script type="text/javascript">
/**this is for tab highliting*/
$(document).ready(function(){
var str=location.href.toLowerCase();
$(".navigation li a").each(function() {
if (str.indexOf(this.href.toLowerCase()) > -1 ) {
$("li.highlight").removeClass("highlight");
$(this).parent().addClass("highlight");
}
});
})
/**this is for paging highliting*/
$(document).ready(function(){
var str=location.href.toLowerCase();
$(".paging li a").each(function() {
if (str.indexOf(this.href.toLowerCase()) > -1 ) {
$("li.highlight").removeClass("highlight");
// i need codes here to addclass "highlight" previously selected tab after page was refreshed
$("li.hp").removeClass("hp");
$(this).parent().addClass("hp");
}
});
})
</script>
thanks..!!