Saved Bookmarks
| 1. |
What Is The Use Of “clone” Method In Jquery? |
|
Answer» “CLONE” method is used to copy the matched elements. So all its childrens are also being copied along with the PARENT ELEMENT. For example: $(document).ready(function(){ $('#mycontrolid').CLICK(function(){ $('#mySpan').clone().prependTo("div");; return FALSE; }); }); “clone” method is used to copy the matched elements. So all its childrens are also being copied along with the parent element. For example: $(document).ready(function(){ $('#mycontrolid').click(function(){ $('#mySpan').clone().prependTo("div");; return false; }); }); |
|