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
94e59e28
Commit
94e59e28
authored
Dec 03, 2006
by
Jörn Zaefferer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code and documentation cleanup; fixed #317 and #464
parent
39c05d36
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
111 deletions
+80
-111
coreTest.js
src/jquery/coreTest.js
+4
-14
jquery.js
src/jquery/jquery.js
+76
-97
No files found.
src/jquery/coreTest.js
View file @
94e59e28
...
...
@@ -263,20 +263,6 @@ test("filter()", function() {
isSet
(
$
(
"p"
).
filter
([
"#ap"
,
"#sndp"
]).
get
(),
q
(
"ap"
,
"sndp"
),
"filter(Array<String>)"
);
});
test
(
"filter(String) - execute callback in fitting context"
,
function
()
{
expect
(
1
);
$
(
"input"
).
filter
(
":checked"
,
function
(
i
){
ok
(
this
==
q
(
"radio2"
,
"check1"
)[
i
],
"Filter elements, context"
);
});
});
test
(
"filter(String) - execute callback in not-fitting context"
,
function
()
{
expect
(
1
);
$
(
"#main > p#ap > a"
).
filter
(
"#foobar"
,
function
(){},
function
(
i
){
ok
(
this
==
q
(
"google"
,
"groups"
,
"mark"
)[
i
],
"Filter elements, else context"
);
});
});
test
(
"not(String)"
,
function
()
{
ok
(
$
(
"#main > p#ap > a"
).
not
(
"#google"
).
length
==
2
,
"not('selector')"
)
isSet
(
$
(
"p"
).
not
(
"#ap, #sndp"
).
get
(),
q
(
"firstp"
,
"en"
,
"sap"
,
"first"
,
"result"
),
"not('selector, selector')"
);
...
...
@@ -564,4 +550,8 @@ test("removeClass(String) - add three classes and remove again", function() {
if
(
div
.
get
(
i
).
className
.
match
(
/test|bar|foo/
)
)
pass
=
false
;
}
ok
(
pass
,
"Remove multiple classes"
);
});
test
(
"removeAttr(String"
,
function
()
{
ok
(
$
(
'#mark'
).
removeAttr
(
"class"
)[
0
].
className
==
""
,
"remove class"
);
});
\ No newline at end of file
src/jquery/jquery.js
View file @
94e59e28
This diff is collapsed.
Click to expand it.
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