$('table') ... gets all tables $('table').eq(1) ... gets the second table $('#formelement').parent().parent().parent() ... gets the 'great-grandad' of #formelement
or, to look back up the DOM for a table ... var _find = $('#formelement'); while(!_find.is('table')){ _find = _find.parent(); } ...but I would recommend putting another test in this loop, just in case #formelement doesn't have a table above it! Mike Miller-13 wrote: > > > Hi, > > Thanks for the tip...the one other question I have related to this > that I need to move these rows in a table that has no id. The table > does have "form" elements that have id's and I could do something like > this in JS > > document.getElementById("formelement").parentNode.parentNode.parentNode > - this gets a ref to the table > > Likewise > > document.getElementsByTagName("table") and then navigate to the > particular table element I am interested in. > > Question now becomes...how do I do either one of those javascript > functions I am familiar with...with jquery/ > > M > > On Jul 31, 2:57 am, Dave Probert <[EMAIL PROTECTED]> wrote: >> Or for more detailed movement: >> $('tr:eq(3)').insertBefore('tr:eq(1)'); >> or >> $('tr:eq(2)').insertAfter('tr:eq(5)'); >> Note: the numbers are the row count - beginning at 0 (zero) for the >> first row. >> >> Lookup the jquery :xxx qualifiers for more options. >> >> On Jul 31, 4:16 am, Mike Miller <[EMAIL PROTECTED]> wrote: >> >> >> >> > Haven't been able to find any documentation so far that talks about >> > how to move rows around with jquery. Don't really need to sort the >> > whole table...rather I want to move one row to another position. Can >> > this be done?- Hide quoted text - >> >> - Show quoted text - > > > -- View this message in context: http://www.nabble.com/Anything-similar-to-IE%27s-table.moveRow-in-jquery--tf4179383s15494.html#a11960409 Sent from the JQuery mailing list archive at Nabble.com.