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
ecaa4d45
Commit
ecaa4d45
authored
Feb 07, 2007
by
Brandon Aaron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for #910
parent
980b5d72
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
coreTest.js
src/jquery/coreTest.js
+6
-1
jquery.js
src/jquery/jquery.js
+1
-1
No files found.
src/jquery/coreTest.js
View file @
ecaa4d45
...
@@ -210,7 +210,7 @@ test("wrap(String|Element)", function() {
...
@@ -210,7 +210,7 @@ test("wrap(String|Element)", function() {
});
});
test
(
"append(String|Element|Array<Element>|jQuery)"
,
function
()
{
test
(
"append(String|Element|Array<Element>|jQuery)"
,
function
()
{
expect
(
9
);
expect
(
10
);
var
defaultText
=
'Try them out:'
var
defaultText
=
'Try them out:'
var
result
=
$
(
'#first'
).
append
(
'<b>buga</b>'
);
var
result
=
$
(
'#first'
).
append
(
'<b>buga</b>'
);
ok
(
result
.
text
()
==
defaultText
+
'buga'
,
'Check if text appending works'
);
ok
(
result
.
text
()
==
defaultText
+
'buga'
,
'Check if text appending works'
);
...
@@ -239,6 +239,11 @@ test("append(String|Element|Array<Element>|jQuery)", function() {
...
@@ -239,6 +239,11 @@ test("append(String|Element|Array<Element>|jQuery)", function() {
ok
(
$
(
"#sap"
).
append
([]),
"Check for appending an empty array."
);
ok
(
$
(
"#sap"
).
append
([]),
"Check for appending an empty array."
);
ok
(
$
(
"#sap"
).
append
(
""
),
"Check for appending an empty string."
);
ok
(
$
(
"#sap"
).
append
(
""
),
"Check for appending an empty string."
);
ok
(
$
(
"#sap"
).
append
(
document
.
getElementsByTagName
(
"foo"
)),
"Check for appending an empty nodelist."
);
ok
(
$
(
"#sap"
).
append
(
document
.
getElementsByTagName
(
"foo"
)),
"Check for appending an empty nodelist."
);
reset
();
$
(
"#sap"
).
append
(
document
.
getElementById
(
'form'
));
ok
(
$
(
"#sap>form"
).
size
()
==
1
,
"Check for appending a form"
);
});
});
test
(
"appendTo(String|Element|Array<Element>|jQuery)"
,
function
()
{
test
(
"appendTo(String|Element|Array<Element>|jQuery)"
,
function
()
{
...
...
src/jquery/jquery.js
View file @
ecaa4d45
...
@@ -1470,7 +1470,7 @@ jQuery.extend({
...
@@ -1470,7 +1470,7 @@ jQuery.extend({
if
(
arg
.
length
===
0
)
if
(
arg
.
length
===
0
)
return
;
return
;
if
(
arg
[
0
]
==
undefined
)
if
(
arg
[
0
]
==
undefined
||
jQuery
.
nodeName
(
arg
,
"form"
)
)
r
.
push
(
arg
);
r
.
push
(
arg
);
else
else
r
=
jQuery
.
merge
(
r
,
arg
);
r
=
jQuery
.
merge
(
r
,
arg
);
...
...
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