Posted By

robnilas on 01/21/17


Tagged


Versions (?)

jQuery Toggle HTML On Click


 / Published in: JavaScript
 

  1. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
  2. </script>
  3. <script>
  4. $(document).ready(function () {
  5. $("#show").click(function () {
  6. $('#visible').slideToggle();
  7. $('#show').html($('#show').text() == '-' ? '+' : '-');
  8. });
  9. })
  10. </script>

Report this snippet  

You need to login to post a comment.