Stuck! Please help!

Stuck! Please help!

Hi! I'm new to jQuery and I need some help to figure it out.

When the page is fully loaded for the first time, click on the first tab (profile) and you'll see the problem: it wants to load the menu-item again. All I want is that when it first loads the page, it already knows it is in loaded state. 


Thanks in advance! http://bit.ly/gLilCo


  1. $(window).load(function(){
  2.  
  3. $('#page2').delay(200);
  4. $('#page2').show('slow'); 
  5.  
  6. $('#content>dd').css({display:'block'})
  7.  
  8. $('#thumbs').jScrollPane({
  9.    showArrows:false,
  10.    scrollbarWidth:28,
  11.    dragMaxHeight:82,
  12.     })
  13.  
  14.  $('#thumbs li a').live('click',function(){
  15. $('#pic').attr('src',$(this).attr('href')).bind('load',function(){
  16. $(this).css({opacity:0}).stop().animate({opacity:1})
  17. })
  18. return false
  19. }).each(function(){
  20. var tmp=new Image()
  21. tmp.src=this.href
  22. })
  23.  
  24.  $('#content>dd').css({display:'none'})
  25. })
  26. $(function(){
  27. $('#content:not(.nav_block)>dt:not(.active) a,footer .privacy:not(.active) a[rel=privacy]').live('click',function(){
  28. var next=this.rel=='privacy'?
  29. $('#privacy'):$(this).parent().next(),
  30. width=next.width(),
  31. parent=next.parent(),
  32. visible=parent.find('>dd:visible').css({overflow:'hidden'})
  33. parent.addClass('nav_block')
  34.  
  35. $('#content>dt,.privacy').removeClass('active')
  36.  
  37. $(this).parent().addClass('active')
  38.  
  39. if(this.rel=='privacy')
  40. $('#content>dt>a').removeClass('active').animate({opacity:0})
  41.  
  42. if(parent.css('left')!=0)
  43. next.parent().animate({left:0})
  44. next.show().css({width:'64px'}).stop().animate({width:width+'px'},{
  45.   step:visible.length?function(now){
  46. visible.width(width-now)
  47. }:'',complete:function(){
  48. next.css({overflow:'visible'})
  49. visible.css({width:width+'px'}).hide()
  50. parent.removeClass('nav_block')
  51. }})
  52. return false
  53. })
  54.  
  55. $('.active a,#content.nav_block').live('click',function(){
  56. return false
  57. })