With native JavaScript:
newelement = element.cloneNode(bool)
where the Boolean indicates whether to clone child nodes or not.
More Related Contents:
- Change from (+) symbol to (-) after click (function(){
- How can I create an Asynchronous function in Javascript?
- how to get GET and POST variables with JQuery?
- Equivalent of String.format in jQuery
- Fire jQuery event on div change
- How to use source: function()… and AJAX in JQuery UI autocomplete
- How to scroll to top of page with JavaScript/jQuery?
- How to detect scroll position of page using jQuery
- How to use jQuery to select a dropdown option?
- How to detect chrome and safari browser (webkit)
- How to get current date in jQuery?
- Why “$().ready(handler)” is not recommended?
- knockout data-bind on dynamically generated elements
- How can I use JSON data to populate the options of a select box?
- Resize on div element
- jQuery JSON looping through nested objects
- function in setInterval() executes without delay
- How to check in js that user has checked the checkbox in Google recaptcha?
- Alert for unsaved changes in form
- new Image(), how to know if image 100% loaded or not?
- How to improve rendering performance when using $.html()
- jQuery Youtube URL Validation with regex
- AngularJS : ng-model binding not updating when changed with jQuery
- how to read json result in jquery?
- How to change tabs programmatically in jquery-ui 1.9?
- Trigger for span text/html on changed
- Changing cursor to waiting in javascript/jquery
- Bootstrap modal hide is not working
- Returning value from confirmation dialog using JQuery UI dialog
- A non-nested animation sequence in jQuery?