How can I use jQuery for messing with a specific div, but not in the current document - in a variable that contains HTML?
The fact is that I want to show a preview of the page (part of its contents) in a modal window when a link to this page is clicked. Well, onClick I load all this HTML into a variable via JSON, and then ... how would I find the specific div I need? It will be almost impossible to parse it with PHP before converting it to JSON and returning the jQuery processor due to the deep hierarchy. Basically, you can even make smth like $ ('div # some-id'). Blabla (); not for the current document, but for a document stored in a variable?
Thank you all in advance.
source
share