git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implemented #753
[jquery.git]
/
src
/
jquery
/
coreTest.js
diff --git
a/src/jquery/coreTest.js
b/src/jquery/coreTest.js
index
169380b
..
436dcc5
100644
(file)
--- a/
src/jquery/coreTest.js
+++ b/
src/jquery/coreTest.js
@@
-67,9
+67,13
@@
test("attr(String)", function() {
ok( $('#form').attr('action').indexOf("formaction") >= 0, 'Check for action attribute' );
\r
});
\r
\r
ok( $('#form').attr('action').indexOf("formaction") >= 0, 'Check for action attribute' );
\r
});
\r
\r
-test("attr(String, Function)", function() {
\r
+test("attr(String, Function|String)", 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
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
+ reset();
\r
+ $('#text1, #text2').attr({value: "${this.id + 'foobar'}"});
\r
+ ok( $('#text1')[0].value == "text1foobar", "Set value from id" );
\r
+ ok( $('#text2')[0].value == "text2foobar", "Set value from id" );
\r
});
\r
\r
test("attr(Hash)", function() {
\r
});
\r
\r
test("attr(Hash)", function() {
\r