Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 0.78 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.     <script type="text/javascript">
  2.         $(document).ready(function() {
  3.             $(".notes").hide();
  4.  
  5.             $(".notesCount").click(function() {
  6.                 toggleExpansionImage($(this).parent().find(".expand"));
  7.                 $(this).parent().next().toggle();
  8.             });
  9.  
  10.             $('.expand').click(function() {
  11.                 toggleExpansionImage($(this));
  12.                 $(this).parent().next().toggle();
  13.             });
  14.         });
  15.  
  16.         function toggleExpansionImage(id) {
  17.             if ($(id).hasClass('hidden'))
  18.                 $(id).find("#expandImg").attr("src", "_assets/img/plus.png");
  19.             else
  20.                 $(id).find("#expandImg").attr("src", "_assets/img/minus.png");
  21.  
  22.             $(id).toggleClass('hidden');            
  23.         }
  24.     </script>