I need to clone a section of markup that has already been modified in the DOM. I want to get the original HTML source - what is seen in View > Source.
clone() uses what's in the DOM
You can't.
If you need it, store the original markup in a JavaScript var before making any modifications.
Try putting it in a variable before the DOM is manipulated. I use this method for jQuery templating... var template = $('#template').html()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With