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
8e1d3697
Commit
8e1d3697
authored
Sep 22, 2010
by
jeresig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some minor lint fixes for the RegExp.
parent
9dc6e0c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
attributes.js
src/attributes.js
+4
-4
core.js
src/core.js
+1
-1
No files found.
src/attributes.js
View file @
8e1d3697
(
function
(
jQuery
)
{
var
rclass
=
/
[\n\t]
/g
,
rspace
=
/
\s
+/
,
rspace
s
=
/
\s
+/
,
rreturn
=
/
\r
/g
,
rspecialurl
=
/^
(?:
href|src|style
)
$/
,
rtype
=
/^
(?:
button|input
)
$/i
,
...
...
@@ -32,7 +32,7 @@ jQuery.fn.extend({
}
if
(
value
&&
typeof
value
===
"string"
)
{
var
classNames
=
(
value
||
""
).
split
(
rspace
);
var
classNames
=
(
value
||
""
).
split
(
rspace
s
);
for
(
var
i
=
0
,
l
=
this
.
length
;
i
<
l
;
i
++
)
{
var
elem
=
this
[
i
];
...
...
@@ -66,7 +66,7 @@ jQuery.fn.extend({
}
if
(
(
value
&&
typeof
value
===
"string"
)
||
value
===
undefined
)
{
var
classNames
=
(
value
||
""
).
split
(
rspace
);
var
classNames
=
(
value
||
""
).
split
(
rspaces
);
for
(
var
i
=
0
,
l
=
this
.
length
;
i
<
l
;
i
++
)
{
var
elem
=
this
[
i
];
...
...
@@ -104,7 +104,7 @@ jQuery.fn.extend({
// toggle individual class names
var
className
,
i
=
0
,
self
=
jQuery
(
this
),
state
=
stateVal
,
classNames
=
value
.
split
(
rspace
);
classNames
=
value
.
split
(
rspace
s
);
while
(
(
className
=
classNames
[
i
++
])
)
{
// check each className given, space seperated list
...
...
src/core.js
View file @
8e1d3697
...
...
@@ -17,7 +17,7 @@ var jQuery = function( selector, context ) {
// A simple way to check for HTML strings or ID strings
// (both of which we optimize for)
quickExpr
=
/^
(?:[^
<
]
*
(
<
[\w\W]
+>
)[^
>
]
*$|#
([\w
-
]
+
)
$
)
/
,
quickExpr
=
/^
(?:[^
<
]
*
(
<
[\w\W]
+>
)[^
>
]
*$|#
([\w
\
-]
+
)
$
)
/
,
// Is it a simple selector
isSimple
=
/^.
[^
:#
\[\.
,
]
*$/
,
...
...
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