I have one element, when dragged to another place that element is cloned and i have two elements with same id and etc, but the parent is different, how can i set some style or whatever to the cloned element, but not affecting the older one, from witch i cloned. And again every class and id is the same, just different parent .
Share
You need to prefix any attributes with the parent’s id. For example instead of using
You would use
or with jQuery
And just as a side note, try not to clone nodes with ids. An id should be unique.