just a bit of explanation on what you tried and why it didn't work:
 $('#myTable > tr');

means "select TR tags immediately (>) after the TABLE tag, whereas, as karl
rightly pointed out, for browsers, even though you wrote your html as table
> tr, it really is table > tbody tr

whereas

$('#myTable tr');

means: "select all TR inside the TABLE tags". No problem if there is a tbody
or not, the TR is in any case inside the table.

also you wrote

table#myTable  it is ok, but it is in fact  a bit slower to process because
there is nothing more efficient that getElementById. If you specify the tag
TABLE, then it first looks for TABLES tags, then check for their id.  so it
is better to use only the ID.



On Thu, Oct 16, 2008 at 9:23 AM, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:

>
> This worked. Thank you very much for your help.
>
> -jl
>
> On Oct 15, 4:10 pm, "Alexandre Plennevaux" <[EMAIL PROTECTED]>
> wrote:
> > $('#myTable tr');
> >
> > HTH
> >
> > Alex
> >
> > On Thu, Oct 16, 2008 at 12:59 AM, [EMAIL PROTECTED] <
> >
> > [EMAIL PROTECTED]> wrote:
> >
> > > Here you go. I am looking for a general solution.
> >
> > > -jl
> >
> > > <table id="myTable">
> > > <tr id="myTable_row_0">
> > > <td></td>
> > > </tr>
> > > <tr id="myTable_row_1">
> > > <td></td>
> > > </tr>
> > > </table>
> >
> > > On Oct 15, 3:32 pm, MorningZ <[EMAIL PROTECTED]> wrote:
> > > > Show a snip of HTML for the table would be of great help for others
> to
> > > > help you
> >
> > > > On Oct 15, 5:53 pm, "[EMAIL PROTECTED]"
> >
> > > > <[EMAIL PROTECTED]> wrote:
> > > > > I am creating a series of tables and would like to be able to grab
> all
> > > > > the rows inside of a particular table.
> >
> > > > > I tried" $( table#myTable > tr ) with no avail. I am still new to
> > > > > JQuery so please forgive me if I am missing something obvious.
> >
> > > > > -jl
>

Reply via email to