How can I use jQuery for messing with a particular div, but not in the current document - in a varia
Posted
by bisaram
on Stack Overflow
See other posts from Stack Overflow
or by bisaram
Published on 2010-04-21T22:38:38Z
Indexed on
2010/04/21
22:43 UTC
Read the original article
Hit count: 182
How can I use jQuery for messing with a particular div, but not in the current document - in a variable, that contains HTML?
The point is that I want to show a preview of a page (a piece of it's content) in a modal window, when the link to this page is clicked. Well, onClick I load this whole HTML into a variable via JSON and then... how would I find a particular div I need in it? It's gonna be almost impossible to parse it with PHP before converting it into JSON and giving back to jQuery processor because of a deep hierarchy. Basically, is it even possible to do smth like $( 'div#some-id' ).blabla(); not for the current document, but for the document, stored in a variable?
Thx everyone in advance.
© Stack Overflow or respective owner