Jump to content

jquery help


TheWebMan

Recommended Posts

Let's say we have this code.

$(document).ready(function() {
	$('#head button').click(function() {
		$('#down').slideDown(200);
	});
});

How can I make as if when I click on the #head is the #down content shows, but what do I do if I want it to dissapear when I click the button again?

 

I tried using this aswell

$('head button').click(function() {
		$('#down').hide();

This code works but it's buggy.

 

also, when It closes I want to be able to open it again, How could I make it do that?

Link to comment
https://forums.phpfreaks.com/topic/294968-jquery-help/
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.