Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
aa81bb5e
Commit
aa81bb5e
authored
Dec 14, 2009
by
Karl Swedberg
Committed by
John Resig
Dec 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added a couple missing semicolons and fixed a typo in the comments
parent
1d921e21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
attributes.js
test/unit/attributes.js
+3
-3
No files found.
test/unit/attributes.js
View file @
aa81bb5e
...
@@ -6,7 +6,7 @@ var functionReturningObj = function(value) { return (function() { return value;
...
@@ -6,7 +6,7 @@ var functionReturningObj = function(value) { return (function() { return value;
test
(
"attr(String)"
,
function
()
{
test
(
"attr(String)"
,
function
()
{
expect
(
28
);
expect
(
28
);
// This one sometimes fails random
al
ly ?!
// This one sometimes fails randomly ?!
equals
(
jQuery
(
'#text1'
).
attr
(
'value'
),
"Test"
,
'Check for value attribute'
);
equals
(
jQuery
(
'#text1'
).
attr
(
'value'
),
"Test"
,
'Check for value attribute'
);
equals
(
jQuery
(
'#text1'
).
attr
(
'value'
,
"Test2"
).
attr
(
'defaultValue'
),
"Test"
,
'Check for defaultValue attribute'
);
equals
(
jQuery
(
'#text1'
).
attr
(
'value'
,
"Test2"
).
attr
(
'defaultValue'
),
"Test"
,
'Check for defaultValue attribute'
);
...
@@ -70,7 +70,7 @@ if ( !isLocal ) {
...
@@ -70,7 +70,7 @@ if ( !isLocal ) {
test
(
"attr(String, Function)"
,
function
()
{
test
(
"attr(String, Function)"
,
function
()
{
expect
(
2
);
expect
(
2
);
equals
(
jQuery
(
'#text1'
).
attr
(
'value'
,
function
()
{
return
this
.
id
})[
0
].
value
,
"text1"
,
"Set value from id"
);
equals
(
jQuery
(
'#text1'
).
attr
(
'value'
,
function
()
{
return
this
.
id
;
})[
0
].
value
,
"text1"
,
"Set value from id"
);
equals
(
jQuery
(
'#text1'
).
attr
(
'title'
,
function
(
i
)
{
return
i
}).
attr
(
'title'
),
"0"
,
"Set value with an index"
);
equals
(
jQuery
(
'#text1'
).
attr
(
'title'
,
function
(
i
)
{
return
i
}).
attr
(
'title'
),
"0"
,
"Set value with an index"
);
});
});
...
@@ -299,7 +299,7 @@ var testAddClass = function(valueObj) {
...
@@ -299,7 +299,7 @@ var testAddClass = function(valueObj) {
var
j
=
jQuery
(
"#nonnodes"
).
contents
();
var
j
=
jQuery
(
"#nonnodes"
).
contents
();
j
.
addClass
(
valueObj
(
"asdf"
)
);
j
.
addClass
(
valueObj
(
"asdf"
)
);
ok
(
j
.
hasClass
(
"asdf"
),
"Check node,textnode,comment for addClass"
);
ok
(
j
.
hasClass
(
"asdf"
),
"Check node,textnode,comment for addClass"
);
}
}
;
test
(
"addClass(String)"
,
function
()
{
test
(
"addClass(String)"
,
function
()
{
testAddClass
(
bareObj
);
testAddClass
(
bareObj
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment