[jQuery] Re: how to select elements inside jQuery objects

2009-04-16 Thread Josch


I don't really understand what you want to do...
Do you want to select a DOM-Object like
form class=example
?
Then, the selector would be $(form.example).


Josch


On 16 Apr., 10:47, hybris77 dist...@yahoo.com wrote:
 i've tried to do the following on a grand scale the last few days,
 please help

 my suggestion to select a classname inside a object containing the
 xhtml

 $(  mol_elements .mol_row ).append( td+ molname +/td);

 I was then suggested the following, but that selects BOTH class and
 element, right?

 $( .mol_row, mol_elements ).append( td+ molname +/td);

 how to select the classname inside the object then?

 /pär


[jQuery] Re: how to select elements inside jQuery objects

2009-04-16 Thread Leonardo K
Try this:

$(mol_elements).filter(.mol_row).append( td+ molname +/td);

On Thu, Apr 16, 2009 at 09:08, Josch jluelsd...@googlemail.com wrote:



 I don't really understand what you want to do...
 Do you want to select a DOM-Object like
 form class=example
 ?
 Then, the selector would be $(form.example).


 Josch


 On 16 Apr., 10:47, hybris77 dist...@yahoo.com wrote:
  i've tried to do the following on a grand scale the last few days,
  please help
 
  my suggestion to select a classname inside a object containing the
  xhtml
 
  $(  mol_elements .mol_row ).append( td+ molname +/td);
 
  I was then suggested the following, but that selects BOTH class and
  element, right?
 
  $( .mol_row, mol_elements ).append( td+ molname +/td);
 
  how to select the classname inside the object then?
 
  /pär



[jQuery] Re: how to select elements inside jQuery objects

2009-04-16 Thread Andy Matthews

It's called context. Using your example, if you wanted to select all items
with a class of .mol_row INSIDE the jQuery object mol_elements, you'd do
this:

$(.mol_row, mol_elements)

That selector says look for .mol_row in the context of mol_elements.


Andy matthews

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of hybris77
Sent: Thursday, April 16, 2009 3:48 AM
To: jQuery (English)
Subject: [jQuery] how to select elements inside jQuery objects


i've tried to do the following on a grand scale the last few days, please
help


my suggestion to select a classname inside a object containing the xhtml

$(  mol_elements .mol_row ).append( td+ molname +/td);


I was then suggested the following, but that selects BOTH class and element,
right?

$( .mol_row, mol_elements ).append( td+ molname +/td);

how to select the classname inside the object then?

/pär