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

Untitled

By: a guest on Jun 26th, 2012  |  syntax: None  |  size: 0.67 KB  |  hits: 7  |  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. Problem with jerky animation in jQuery
  2. <h2>Phthalate Free: </h2><div class="yamikowebsToggler">
  3.     <p>
  4.     Dibutyl Phthalate is linked to cancer and is present in nail polish, perfume, soft plastics and skin care products.
  5.     </p></div>
  6.        
  7. h2{color:#76DEFC; margin:0px;}
  8.     .yamikowebsToggler{margin:0px;}
  9.     p{margin:0px; color;#000000;}
  10.        
  11. $(document).ready(function(){
  12.     $(".yamikowebsToggler").fadeOut(0);
  13.     $("h2").click(function()
  14.     {
  15.         $(this).next(".yamikowebsToggler").stop(true, true).animate(
  16.         { height: 'toggle' },
  17.         {
  18.             duration: 1000,
  19.         });
  20.     })
  21. });
  22.        
  23. position: absolute;
  24. visible:none;
  25.        
  26. style="height:heightInPx;"