Hi all,
First off, thanks for this forum. I just found it and hope to build the community.
My problem is I tried using this tutorial to make tabs:
[url]http://apricotstudios.wordpress.com/2008/08/29/jquery-tabs-tutorial/
The problem is that when you refresh, it displays the first tab. If you were on any other tab and refreshed, then you have to click it again.
I did try to use jQuery Tabs, but I couldn’t figure out how to theme it myself without using theme roller.
Here is my implementation of it:
[CODE]<script type=”text/javascript”>
$(document).ready(function(){
$(‘#user_content .maintab’).hide(); // Hide all divs that are ‘hideable’
$(‘#user_content #top’).show();
$(‘#user_content div:first’).show(); // Show the first div
$(‘#user_content ul li:first’).addClass(‘first’); // Set the class of the first link to active
$(‘#user_content ul li a’).click(
function(){ // When any link is clicked
$(‘#user_content ul li’).removeClass(‘active’); // Remove active class from all links
$(‘#user_content ul li’).removeClass(‘first’);
//alert($(this).attr(‘href’));
if($(this).attr(‘href’)==’#user_profile_overview’){
$(this).parent().addClass(‘first’);
}
else{
$(this).parent().addClass(‘active’); // Set clicked link class to active
}
var currentTab = $(this).attr(‘href’); // Set variable currentTab to value of href attribute of clicked link
//alert(currentTab);
$(‘#user_content .maintab’).hide(); // Hide all divs that are ‘hideable’
$(‘#user_content #top’).show();
$(currentTab).show(); // Show div with id equal to variable currentTab
return false;
});
});
</script>
Thanks so much in advance!