Opened 14 years ago
Closed 13 years ago
#4284 closed feature (fixed)
Method to copy entire data object from element
Reported by: | sliver | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.4 |
Component: | data | Version: | 1.4a1 |
Keywords: | data copy clone | Cc: | |
Blocked by: | Blocking: |
Description
Creating new bug per John Resig: http://groups.google.com/group/jquery-dev/browse_thread/thread/a7d0544e287f662d
Change History (5)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Are events expected to be copied in this method as well? If so, each event will have to be rebound like we do in clone.
comment:4 Changed 14 years ago by
Component: | unfilled → data |
---|
comment:5 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Type: | enhancement → feature |
Version: | 1.3.2 → 1.4a1 |
Note: See
TracTickets for help on using
tickets.
One possible approach would be to have
$("el").data()
return the entire data hash for the element, and$("el").data(hash)
set the entire hash. Then the copy operation would just be:Would that set the #dst data object to the #src object, or would it use $.extend internally to make a copy?