javascript - How to slide down to show content of DIV using CSS/jQuery? -


i create slide down button show content of div has no height. did example here:

fiddle

i looked special form of sliding buttons have found examples div , content has given width , height.

in example structure different quiet simple. there 3 different divisions. head given height, content div (depends padding) should shown , below slider/trigger (also given height) button.

now click on trigger slides down height of content div , content div should appear.

it great if me out.

thanks alot.

i think looking at.

fiddle

   $(document).ready(function () {     $('.content').hide(); //hide initialy     $('.slide').click(function () {         var $this = $(this);         // target content sibling         $(this).siblings('.content').slidetoggle(200, function () {             $this.text($(this).is(':visible') ? 'click close' : 'click open');         });      }); }); 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -