Made it so that you can't change the type of an input element, having it throw an...
[jquery.git] / src / fx / fxTest.js
index dfb9157..1f9e674 100644 (file)
@@ -11,6 +11,29 @@ test("animate(Hash, Object, Function)", function() {
        });
 });
 
+test("stop()", function() {
+       expect(3);
+       stop();
+       reset();
+
+       var foo = $("#foo")[0];
+       var h = foo.style.height;
+
+       $("#foo").slideUp(1000);
+       setTimeout(function(){
+               var nh = foo.style.height;
+               ok( nh != h, "An animation occurred " + nh + " " + h );
+               $("#foo").stop();
+
+               nh = foo.style.height;
+               ok( nh != h, "Stop didn't reset the animation " + nh + " " + h );
+               setTimeout(function(){
+                       equals( nh, foo.style.height, "The animation didn't continue" );
+                       start();
+               }, 100);
+       }, 100);
+});
+
 test("toggle()", function() {
        expect(3);
        var x = $("#foo");
@@ -196,7 +219,7 @@ jQuery.each( from, function(fn, f){
                                
                                if ( t_h == "show" ) {
                                        var old_h = jQuery.curCSS(this, "height");
-                                       $(elem).append("<br>Some more text<br>and some more...");
+                                       $(elem).append("<br/>Some more text<br/>and some more...");
                                        ok(old_h != jQuery.css(this, "height" ), "Make sure height is auto.");
                                }
        
@@ -281,4 +304,4 @@ function makeTest( text ){
        return elem;
 }
 
-makeTest.id = 1;
\ No newline at end of file
+makeTest.id = 1;