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
b22c9046
Commit
b22c9046
authored
Aug 05, 2011
by
Dave Methvin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #456 from rwldrn/9318
Improves support for arbitrary numbers in data keys. Fixes #9318
parents
37254bab
e7af6a29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
core.js
src/core.js
+2
-2
data.js
test/unit/data.js
+6
-3
No files found.
src/core.js
View file @
b22c9046
...
@@ -46,11 +46,11 @@ var jQuery = function( selector, context ) {
...
@@ -46,11 +46,11 @@ var jQuery = function( selector, context ) {
rmozilla
=
/
(
mozilla
)(?:
.*
?
rv:
([\w
.
]
+
))?
/
,
rmozilla
=
/
(
mozilla
)(?:
.*
?
rv:
([\w
.
]
+
))?
/
,
// Matches dashed string for camelizing
// Matches dashed string for camelizing
rdashAlpha
=
/-
([
a-z
])
/ig
,
rdashAlpha
=
/-
([
a-z
]
|
[
0-9
]
)
/ig
,
// Used by jQuery.camelCase as callback to replace()
// Used by jQuery.camelCase as callback to replace()
fcamelCase
=
function
(
all
,
letter
)
{
fcamelCase
=
function
(
all
,
letter
)
{
return
letter
.
toUpperCase
();
return
(
letter
+
""
)
.
toUpperCase
();
},
},
// Keep a UserAgent string for use with jQuery.browser
// Keep a UserAgent string for use with jQuery.browser
...
...
test/unit/data.js
View file @
b22c9046
...
@@ -538,10 +538,13 @@ test("jQuery.data supports interoperable hyphenated/camelCase get/set of propert
...
@@ -538,10 +538,13 @@ test("jQuery.data supports interoperable hyphenated/camelCase get/set of propert
"an-object"
:
{},
"an-object"
:
{},
"bool-true"
:
true
,
"bool-true"
:
true
,
"bool-false"
:
false
,
"bool-false"
:
false
,
"some-json"
:
'{ "foo": "bar" }'
"some-json"
:
'{ "foo": "bar" }'
,
"num-1-middle"
:
true
,
"num-end-2"
:
true
,
"2-num-start"
:
true
};
};
expect
(
18
);
expect
(
24
);
jQuery
.
each
(
datas
,
function
(
key
,
val
)
{
jQuery
.
each
(
datas
,
function
(
key
,
val
)
{
div
.
data
(
key
,
val
);
div
.
data
(
key
,
val
);
...
@@ -578,4 +581,4 @@ test("jQuery.data supports interoperable removal of hyphenated/camelCase propert
...
@@ -578,4 +581,4 @@ test("jQuery.data supports interoperable removal of hyphenated/camelCase propert
equal
(
div
.
data
(
key
),
undefined
,
"get: "
+
key
);
equal
(
div
.
data
(
key
),
undefined
,
"get: "
+
key
);
});
});
});
});
\ No newline at end of file
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