javascript - Show/hide script cannot hide again on 2nd click -


i used jquery show/hide in many place in web. every work in case not hide again in 2nd click.

here example: http://jsfiddle.net/er9e72ww/

show/hide code

$('#uploadmedia').livequery("click",function(){   $('#show_img_upload_div').slidetoggle('slow');   $("#comment").focus();   $('.upfrm').show();   $('#submit').hide(); }); 

use toggle() in jquery hide , show repeatedly

$('#uploadmedia').livequery("click",function(){ $('#show_img_upload_div').slidetoggle('slow'); $("#comment").focus(); $('.upfrm').toggle(); $('#submit').toggle(); }); 

demo


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -