That's way more complex than need be. By definition, the first table cell of the first row is also the first cell in the table, so $("#photographTable td:first") should be perfectly fine. And there's no need to run an each, as click will run fine on the jQuery object returned by the query.
$("#photographTable td:first").click(function() { // code }); should work great. -- Yehuda On 12/27/06, Joan Piedra <[EMAIL PROTECTED]> wrote:
I think it should be something like this $('#photographTable tr:first-child td:first-child').each(function() { $(this).click(function() { //your code here alert('woo ha!'); }); }); On 12/26/06, Mungbeans <[EMAIL PROTECTED] > wrote: > > > I have this table: > > <table id="photographTable"> > <tr> > <td> > <span class="small button" > onclick="showPhotograph(' http://localhost:11000/my.JPG', 1044, > 746);return > false;">Show</span><td>..etc..</td> > </tr> > <tr><td>...etc</td></tr> > </table> > > How do I trigger the on-click event in the first cell, first row? > -- > View this message in context: http://www.nabble.com/Trigger-on-click-event-in-first-table-cell-tf2884409.html#a8058842 > > Sent from the JQuery mailing list archive at Nabble.com. > > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > -- Joan Piedra || Frontend webdeveloper http://joanpiedra.com/ _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
-- Yehuda Katz Web Developer | Wycats Designs (ph) 718.877.1325
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/