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
e9ea6679
Commit
e9ea6679
authored
Dec 19, 2012
by
Oleg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change "isFunc" variable to "isFunction"
parent
76bde01b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
manipulation.js
src/manipulation.js
+5
-6
No files found.
src/manipulation.js
View file @
e9ea6679
...
@@ -83,10 +83,10 @@ jQuery.fn.extend({
...
@@ -83,10 +83,10 @@ jQuery.fn.extend({
},
},
wrap
:
function
(
html
)
{
wrap
:
function
(
html
)
{
var
isFunc
=
jQuery
.
isFunction
(
html
);
var
isFunc
tion
=
jQuery
.
isFunction
(
html
);
return
this
.
each
(
function
(
i
)
{
return
this
.
each
(
function
(
i
)
{
jQuery
(
this
).
wrapAll
(
isFunc
?
html
.
call
(
this
,
i
)
:
html
);
jQuery
(
this
).
wrapAll
(
isFunc
tion
?
html
.
call
(
this
,
i
)
:
html
);
});
});
},
},
...
@@ -197,7 +197,6 @@ jQuery.fn.extend({
...
@@ -197,7 +197,6 @@ jQuery.fn.extend({
try
{
try
{
for
(;
i
<
l
;
i
++
)
{
for
(;
i
<
l
;
i
++
)
{
// Remove element nodes and prevent memory leaks
elem
=
this
[
i
]
||
{};
elem
=
this
[
i
]
||
{};
if
(
elem
.
nodeType
===
1
)
{
if
(
elem
.
nodeType
===
1
)
{
jQuery
.
cleanData
(
getAll
(
elem
,
false
)
);
jQuery
.
cleanData
(
getAll
(
elem
,
false
)
);
...
@@ -208,7 +207,7 @@ jQuery.fn.extend({
...
@@ -208,7 +207,7 @@ jQuery.fn.extend({
elem
=
0
;
elem
=
0
;
// If using innerHTML throws an exception, use the fallback method
// If using innerHTML throws an exception, use the fallback method
}
catch
(
e
)
{}
}
catch
(
e
)
{}
}
}
if
(
elem
)
{
if
(
elem
)
{
...
@@ -218,11 +217,11 @@ jQuery.fn.extend({
...
@@ -218,11 +217,11 @@ jQuery.fn.extend({
},
},
replaceWith
:
function
(
value
)
{
replaceWith
:
function
(
value
)
{
var
isFunc
=
jQuery
.
isFunction
(
value
);
var
isFunc
tion
=
jQuery
.
isFunction
(
value
);
// Make sure that the elements are removed from the DOM before they are inserted
// Make sure that the elements are removed from the DOM before they are inserted
// this can help fix replacing a parent with child elements
// this can help fix replacing a parent with child elements
if
(
!
isFunc
&&
typeof
value
!==
"string"
)
{
if
(
!
isFunc
tion
&&
typeof
value
!==
"string"
)
{
value
=
jQuery
(
value
).
not
(
this
).
detach
();
value
=
jQuery
(
value
).
not
(
this
).
detach
();
}
}
...
...
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