Show hide jquery


/ Published in: jQuery
Save to your folder(s)

Show hide


Copy this code and paste it in your HTML
  1. $('#toggle_message').click(function(){
  2. var value=$('#toggle_message').attr('value');
  3. $('#message').toggle('fast');
  4.  
  5. if(value=='Hide'){
  6. $('#toggle_message').attr('value','Show');
  7. }
  8. else if(value=='Show'){
  9. $('#toggle_message').attr('value','Hide');
  10. }
  11. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.