// Everything else, we just grab the value
} else
- return this[0].value.replace(/\r/g, "");
+ return (this[0].value || "").replace(/\r/g, "");
}
});
test("val()", function() {
- expect(2);
+ expect(3);
ok( $("#text1").val() == "Test", "Check for value of input element" );
ok( !$("#text1").val() == "", "Check for value of input element" );
+ // ticket #1714 this caused a JS error in IE
+ ok( $("#first").val() == "", "Check a paragraph element to see if it has a value" );
});
test("val(String)", function() {