Not sure, whether this is the right forum (or website) but the moderator is the author of my favorite book.
I would like to know whether it's possible to retrieve the original value of an attribute after it has been changed, by dom manipulation.
Just asked the question on the jquery channel, the only possibility I was told, is to store the values upon loading of the document.
Is there another way, via the jquery api?
I'm afraid not. A DOM element's attributes are stored in a NodeList object tacked onto the element. When the attribute value is changed, the value in the node list is changed and the original value is lost.
If you need to be able to reference the original values, then it would be easy in the ready handler to copy the attribute values (the .each() method knows how to iterate over a node list) to an object that stores the values as properties, and then use the .data() method to tack it onto the DOM element for later reference.