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
e7a8310f
Commit
e7a8310f
authored
Jun 29, 2007
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added minor support for |= and ~= selectors.
parent
88c88f07
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
selector.js
src/selector/selector.js
+2
-2
No files found.
src/selector/selector.js
View file @
e7a8310f
...
@@ -53,7 +53,7 @@ jQuery.extend({
...
@@ -53,7 +53,7 @@ jQuery.extend({
// The regular expressions that power the parsing engine
// The regular expressions that power the parsing engine
parse
:
[
parse
:
[
// Match: [@value='test'], [@foo]
// Match: [@value='test'], [@foo]
/^
\[
*
(
@
)([\w
-
]
+
)
*
([
!*$^=
]
*
)
*
(
'
?
"
?)(
.*
?)\4
*
\]
/
,
/^
\[
*
(
@
)([\w
-
]
+
)
*
([
!*$^
~|
=
]
*
)
*
(
'
?
"
?)(
.*
?)\4
*
\]
/
,
// Match: [div], [div p]
// Match: [div], [div p]
/^
(\[)\s
*
(
.*
?(\[
.*
?\])?[^
[
]
*
?)\s
*
\]
/
,
/^
(\[)\s
*
(
.*
?(\[
.*
?\])?[^
[
]
*
?)\s
*
\]
/
,
...
@@ -347,7 +347,7 @@ jQuery.extend({
...
@@ -347,7 +347,7 @@ jQuery.extend({
type
==
"!="
&&
z
!=
m
[
5
]
||
type
==
"!="
&&
z
!=
m
[
5
]
||
type
==
"^="
&&
z
&&
!
z
.
indexOf
(
m
[
5
])
||
type
==
"^="
&&
z
&&
!
z
.
indexOf
(
m
[
5
])
||
type
==
"$="
&&
z
.
substr
(
z
.
length
-
m
[
5
].
length
)
==
m
[
5
]
||
type
==
"$="
&&
z
.
substr
(
z
.
length
-
m
[
5
].
length
)
==
m
[
5
]
||
type
==
"*="
&&
z
.
indexOf
(
m
[
5
])
>=
0
)
^
not
)
(
type
==
"*="
||
type
==
"|="
||
type
==
"~="
)
&&
z
.
indexOf
(
m
[
5
])
>=
0
)
^
not
)
tmp
.
push
(
a
);
tmp
.
push
(
a
);
}
}
...
...
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