Side navigation
#4284 closed feature (fixed)
Opened March 03, 2009 01:13AM UTC
Closed December 09, 2009 09:17PM UTC
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
Attachments (0)
Change History (5)
Changed March 03, 2009 03:23AM UTC by comment:1
Changed March 18, 2009 07:53PM UTC by comment:2
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.
Changed August 07, 2009 05:13PM UTC by comment:4
| component: | unfilled → data |
|---|
Changed December 09, 2009 09:17PM UTC by comment:5
| resolution: | → fixed |
|---|---|
| status: | new → closed |
| type: | enhancement → feature |
| version: | 1.3.2 → 1.4a1 |
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:$("#dst").data($("#src").data());Would that set the #dst data object to the #src object, or would it use $.extend internally to make a copy?