I have saved a div in a javascript object:
DYN = {};
DYN['mydiv'] = $('#my-div').clone(true);
How can I access the attributes of this javascript object directly with jquery. Do i Have to reload the #my-div div first, to access the attributes of the div, or ????
$("#my-div").replaceWith(DYN['mydiv']);
$('#my-div').val();
Since
DYN['mydiv']contains a jQuery object, you should be able to use jQuery methods on it.Demo: http://jsfiddle.net/5rB2X/