Implemented .data() to get the entire data object. Closes #4284
This commit is contained in:
parent
8e54b167cf
commit
d36d224cc5
2 changed files with 12 additions and 0 deletions
|
@ -15,6 +15,14 @@ test("jQuery.data", function() {
|
|||
});
|
||||
|
||||
test(".data()", function() {
|
||||
expect(1);
|
||||
|
||||
var div = jQuery("#foo");
|
||||
div.data("test", "success");
|
||||
isObj( div.data(), {test: "success"}, "data() get the entire data object" )
|
||||
})
|
||||
|
||||
test(".data(String) and .data(String, Object)", function() {
|
||||
expect(22);
|
||||
var div = jQuery("#foo");
|
||||
equals( div.data("test"), undefined, "Check for no data exists" );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue