similarly  I use parent(':last') after a wrap() to continue with the

OOPS actually I used parent()...

it seems parent(':last') gives me the parent of the last object or the
last parent... I will have to check that out further!

On 2/22/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:
> after the append, you can keep the chain going at the freshly appended
> by finding the last child.
>
> by following
>
> $(this).parents("div.sidebarToDo").find("td.sidebarText").empty().append('<input
> type="text" value="" size="10" class="editableItem">')
>
> with
> .children(':last')
>
> since append creates a new last child.
>
> then continue with other jquery calls
>
> similarly  I use parent(':last') after a wrap() to continue with the
> new wrapping.
>
>
> On 2/22/07, Blair Mitchelmore <[EMAIL PROTECTED]> wrote:
> > $(this).parents("div.sidebarToDo").find("input.editableTDItem");  is 
> > probably finding every thing you're added. Are you sure there's only one 
> > element in the resultant jQuery object? Either way, if the last input field 
> > is the only one your care about at the moment you can modify your search to 
> > be $(this).parents("div.sidebarToDo").find("input.editableTDItem:last");
> >
> > -blair
> >
> > [EMAIL PROTECTED] wrote:
> > > Hi,
> > >
> > > If I have
> > >
> > > $(this).parents("div.sidebarToDo").find("td.sidebarText").empty().append('<input
> > >  type="text" value="" size="10" class="editableItem">');
> > >
> > > What is the best way to get a reference to the newly created text field?  
> > > Note that it does not have an ID and I would prefer a more generic way of 
> > > finding it other than "input.editableItem" because on PC IE 6, if I 
> > > insert multiple text fields, like the above, this call  ...
> > >
> > > $(this).parents("div.sidebarToDo").find("input.editableTDItem");
> > >
> > > only returns a correct reference for the first time a textfield is added. 
> > >  I cant get the most recent addition with the above call if there had 
> > > been text fields added in the past.
> > >
> > > Thanks, please let me know what info I can provide to make this question 
> > > more clear, - Dave
> >
> >
> > _______________________________________________
> > jQuery mailing list
> > [email protected]
> > http://jquery.com/discuss/
> >
>
>
> --
> Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
>


-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to