[jQuery] Re: Work on one specific node and not on the window.document

2009-03-31 Thread xPheRe
To locate a node with id myId that is a descendant of another one, in a var called myNode, use: $('#myId', myNode) Hope it helps :) On 30 mar, 17:20, tij_dev tijmas...@googlemail.com wrote: Hi guys ! I assume this is a really basic question but I'm a JQuery rookie :) so please be indulgent

[jQuery] Re: Work on one specific node and not on the window.document

2009-03-31 Thread Steven Yang
do you have a special reason to find an element by id in a specific node?isn't id suppose to be unique in the whole document?

[jQuery] Re: Work on one specific node and not on the window.document

2009-03-31 Thread Klaus Hartl
On 31 Mrz., 08:38, Steven Yang kenshin...@gmail.com wrote: do you have a special reason to find an element by id in a specific node?isn't id suppose to be unique in the whole document? Could think of: It may have different behavior depending on wether it's in the main content or the sidebar.

[jQuery] Re: Work on one specific node and not on the window.document

2009-03-31 Thread tij_dev
Thanks xPheRe this exactly what I wanted. Precisely my issue was that I wanted to print a specific part of a page. To do so i load that content into a hidden iframe I, then, print it. That's why I want to work only on the dom content of this iframe and not on the whole window.document. Thanks

[jQuery] Re: Work on one specific node and not on the window.document

2009-03-31 Thread riotbrrd
By way of explanation, this works because the jQuery selector function has an optional context parameter: $(expression, [context]) . See the docs here: http://docs.jquery.com/Core/jQuery#expressioncontext. -Kim On Mar 30, 11:18 pm, xPheRe xpher...@gmail.com wrote: To locate a node with id myId

[jQuery] Re: Work on one specific node and not on the window.document

2009-03-30 Thread James
What is myNode suppose to be? Without showing us more code and your structure, it's difficult to help. On Mar 30, 5:20 am, tij_dev tijmas...@googlemail.com wrote: Hi guys ! I assume this is a really basic question but I'm a JQuery rookie :) so please be indulgent :) I would like to get an