ok( $('#form').attr('action').indexOf("formaction") >= 0, 'Check for action attribute' );\r
});\r
\r
+test("attr(String, Function)", function() {\r
+ ok( $('#text1').attr('value', function() { return this.id })[0].value == "text1", "Set value from id" );\r
+ ok( $('#text2').attr('value', "${this.id}")[0].value == "text2", "Set value from id" );\r
+});\r
+\r
test("attr(Hash)", function() {\r
expect(1);\r
var pass = true;\r
ok( pass, "Set Attribute" );\r
\r
$("#name").attr('name', 'something');\r
- ok( $("#name").name() == 'something', 'Set name attribute' );\r
+ ok( $("#name").attr('name') == 'something', 'Set name attribute' );\r
$("#check2").attr('checked', true);\r
ok( document.getElementById('check2').checked == true, 'Set checked attribute' );\r
$("#check2").attr('checked', false);\r