jQuery: The Write Less, Do More JavaScript Library

Basic Selectors Question

View: New views
4 Messages — Rating Filter:   Alert me  

Basic Selectors Question

by PaulF-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

I have what I think is probablt a pretty easy question, but I have
tried numerous selctors without getting the correct id.

I have a form which is dynamically generating form fields and tables
all over the place.  I need to pull an ID of the last table inside of
a particular td.  I have tried:
 $("#mytd table:last").attr("id");  and a few other things none of
which successful.

<td id="mytd">
   <table id="mytable0"></table>
   <table id="mytable1"></table>
   <table id="mytable2"></table>
   <table id="mytable..n"></table>
</td>

Can somone help me out?  Thanks in advance!

Resizables and proxy class

by Javier Martínez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I'm working with resizable plugin and I see on documentation
(http://docs.jquery.com/UI/Resizables/resizable) that there is one
option "proxy" that will add the specified className to the proxy element.
Whatever I set on the options is avoided, because resizable always
attach a "proxy" css className.
Is this a documentation, code or my error?

Thanks.

Re: Basic Selectors Question

by Glen Lipka :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I whipped up a demo.
http://www.commadot.com/jquery/selectorNestedTable.php

Does this work for you?

Glen

On Mon, May 12, 2008 at 11:55 PM, PaulF <paulfitzpa@...> wrote:

Hi,

I have what I think is probablt a pretty easy question, but I have
tried numerous selctors without getting the correct id.

I have a form which is dynamically generating form fields and tables
all over the place.  I need to pull an ID of the last table inside of
a particular td.  I have tried:
 $("#mytd table:last").attr("id");  and a few other things none of
which successful.

<td id="mytd">
  <table id="mytable0"></table>
  <table id="mytable1"></table>
  <table id="mytable2"></table>
  <table id="mytable..n"></table>
</td>

Can somone help me out?  Thanks in advance!


Re: Basic Selectors Question

by PaulF-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

I think my issue may have related to a broken DOM from the code I was
appending to the form.  I fixed those issues, and then used:

var table_id = $("#funds_list > table:last").attr("id");

Which is working well.  Thanks for the help!


On May 14, 2:59 am, "Glen Lipka" <g...@...> wrote:

> I whipped up a demo.http://www.commadot.com/jquery/selectorNestedTable.php
>
> Does this work for you?
>
> Glen
>
> On Mon, May 12, 2008 at 11:55 PM, PaulF <paulfit...@...> wrote:
>
> > Hi,
>
> > I have what I think is probablt a pretty easy question, but I have
> > tried numerous selctors without getting the correct id.
>
> > I have a form which is dynamically generating form fields and tables
> > all over the place.  I need to pull an ID of the last table inside of
> > a particular td.  I have tried:
> >  $("#mytd table:last").attr("id");  and a few other things none of
> > which successful.
>
> > <td id="mytd">
> >   <table id="mytable0"></table>
> >   <table id="mytable1"></table>
> >   <table id="mytable2"></table>
> >   <table id="mytable..n"></table>
> > </td>
>
> > Can somone help me out?  Thanks in advance!