0 Replies - 1016 Views - Last Post: 03 July 2009 - 01:46 AM

#1 ghqwerty   User is offline

  • if($spareTime > 0){ $this->writeCode(); }
  • member icon

Reputation: 43
  • View blog
  • Posts: 903
  • Joined: 08-August 08

jquery - hide and show links

Posted 03 July 2009 - 01:46 AM

ok so i have this script which ive been trying to work with and ive only started looking at this this morning about an hour ago but here goes,

$(document).ready(function() {
   
 	
	$("#panel").hide();

	var a = $("<a id='stats'>Stats</a>").attr('href','#').addClass("btn-slide");
	$('#panel').before(a);


   $(".btn-slide").click(function(){  
	if ($("#panel").is(":hidden")) {   
		$("#panel").slideDown("slow");
	$(this).addClass("active");
		 $.cookie('showTop', 'collapsed');
	return false;
	
	  } else {
		$("#panel").slideUp("slow");
	$(this).removeClass("active");
		$.cookie('showTop', 'expanded');
	return false;

	  }
	
   });

// COOKIES
	// Header State
	var showTop = $.cookie('showTop');

	// Set the user's selection for the Header State
	if (showTop == 'collapsed') {
	$("#panel").show();
	$(".btn-slide").addClass("active");
	
	};
 
});


i would like to know a) if it is possible to have multiple drop down list

This post has been edited by ghqwerty: 03 July 2009 - 01:47 AM


Is This A Good Question/Topic? 0
  • +

Page 1 of 1