TheWebMan Posted February 28, 2015 Share Posted February 28, 2015 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 More sharing options...
NetGuru87 Posted April 28, 2015 Share Posted April 28, 2015 Like in Toggle? http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_toggle You should be able to apply that example to whatever you are doing. Link to comment https://forums.phpfreaks.com/topic/294968-jquery-help/#findComment-1510191 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.