Test Case Boilerplate

Fork this way...

HTML

<button>Try!</button>
<div>HTML</div>

CSS

div {
    display:inline-block;
    padding:40px;
    background-color:#ccc;
}

JavaScript

/* 
  IE 8 error in jQuery.stop() v1.7
  The bug is triggered when jQuery saves the 
  old "display" property of a hidden layer:
*/

$('<div>').hide().text('jQuery').appendTo('body');

/* 
  Now let's call the stop() function:
*/

$('button').click(function() {
    $('div').stop(true, true).fadeToggle(1000);
});

/*  
  If you stop the animation before it's completed you can observe
  another bug: the original opacity doesn't get preserved, i.e. the
  opacity will not be 1 after fadeIn(). 
*/