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
d9464547
Commit
d9464547
authored
Jan 23, 2007
by
Jörn Zaefferer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix/test for #861
parent
5cfaef9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
coreTest.js
src/jquery/coreTest.js
+10
-0
jquery.js
src/jquery/jquery.js
+4
-3
No files found.
src/jquery/coreTest.js
View file @
d9464547
...
...
@@ -663,3 +663,13 @@ test("eq(), gt(), lt(), contains()", function() {
isSet
(
$
(
"#ap a"
).
lt
(
3
).
get
(),
q
(
"google"
,
"groups"
,
"anchor1"
),
"lt()"
);
isSet
(
$
(
"#foo a"
).
contains
(
"log"
).
get
(),
q
(
"anchor2"
,
"simon"
),
"contains()"
);
});
test
(
"click() context"
,
function
()
{
$
(
'<li><a href="#">Change location</a></li>'
).
prependTo
(
'#firstUL'
).
find
(
'a'
).
bind
(
'click'
,
function
()
{
var
close
=
$
(
'spanx'
,
this
);
// same with $(this).find('span');
ok
(
close
.
length
==
0
,
"Element does not exist, length must be zero"
);
ok
(
!
close
[
0
],
"Element does not exist, direct access to element must return undefined"
);
//console.log( close[0]); // it's the <a> and not a <span> element
return
false
;
}).
click
();
});
\ No newline at end of file
src/jquery/jquery.js
View file @
d9464547
...
...
@@ -257,9 +257,10 @@ jQuery.fn = jQuery.prototype = {
* @cat Core
*/
pushStack
:
function
(
a
)
{
var
ret
=
jQuery
(
this
);
var
ret
=
jQuery
(
a
);
ret
.
prevObject
=
this
;
return
ret
.
setArray
(
a
);
//return ret.setArray( a );
return
ret
;
},
/**
...
...
@@ -803,7 +804,7 @@ jQuery.fn = jQuery.prototype = {
find
:
function
(
t
)
{
return
this
.
pushStack
(
jQuery
.
map
(
this
,
function
(
a
){
return
jQuery
.
find
(
t
,
a
);
})
);
})
,
t
);
},
/**
...
...
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