"CSS Auto": function(elem,prop){
jQuery(elem).addClass("auto" + prop)
.text("This is a long string of text.");
- return prop == "opacity" ? 1 : "";
+ return "";
},
"JS Auto": function(elem,prop){
- jQuery(elem).css(prop,"auto")
+ jQuery(elem).css(prop,"")
.text("This is a long string of text.");
- return prop == "opacity" ? 1 : "";
+ return "";
},
"CSS 100": function(elem,prop){
jQuery(elem).addClass("large" + prop);
- return prop == "opacity" ? 1 : "";
+ return "";
},
"JS 100": function(elem,prop){
jQuery(elem).css(prop,prop == "opacity" ? 1 : "100px");
},
"CSS 50": function(elem,prop){
jQuery(elem).addClass("med" + prop);
- return prop == "opacity" ? 0.5 : "";
+ return "";
},
"JS 50": function(elem,prop){
jQuery(elem).css(prop,prop == "opacity" ? 0.50 : "50px");
},
"CSS 0": function(elem,prop){
jQuery(elem).addClass("no" + prop);
- return prop == "opacity" ? 0 : "";
+ return "";
},
"JS 0": function(elem,prop){
jQuery(elem).css(prop,prop == "opacity" ? 0 : "0px");
var cur_o = jQuery.style(this, "opacity");
- if ( cur_o !== "" ) {
- cur_o = jQuery.css(this, "opacity");
- }
-
if ( t_o == "hide" || t_o == "show" )
equals(cur_o, f_o, "Opacity must be reset to " + f_o + ": " + cur_o);
if ( t_h == "show" ) {
var old_h = jQuery.css(this, "height");
jQuery(this).append("<br/>Some more text<br/>and some more...");
- notEqual(jQuery.css(this, "height") + "px", old_h, "Make sure height is auto.");
+
+ if ( /Auto/.test( fn ) ) {
+ notEqual(jQuery.css(this, "height"), old_h, "Make sure height is auto.");
+ } else {
+ equals(jQuery.css(this, "height"), old_h, "Make sure height is not auto.");
+ }
}
start();