HTML/CSS changeb by Jquery


#1

What happens to the original HTML and the orignal CSS when you change things via Jquery??

Thanks,


#2

When the page loads, the source HTML is parsed and the browser constructs the Document Tree (the principal component of the DOM). Once script is allowed to run, any changes it makes to the DOM are not reversible unless some form of rollback is designed into the code. The same applies to changes in the style sheet. The only rollback mechanism is a page reload.


#3

@arrayblaster64555,
Maybe
https://forum.jquery.com/topic/undo-css-changes-applied-usind-jquery


#4

As mentioned,

unless some form of rollback is designed into the code

Under normal constraints, and assuming no such mechanism has been written into the code, changes are not reversible. The source document is still present, but the DOM version once changed remains different from the original.