I've tried the method Mehmet but still no success with this goal
(select every first TD on every TR.
Maybe im doing something wrong, but can someone assure if this code is
in fact correct?
Regards!
On Jun 10, 10:40 am, Mehmet AVSAR [EMAIL PROTECTED] wrote:
$(tr).each(function() {
$(TD,
what about:
$('tr').each(function(){
$('td:first', this).addClass('tomas');
});
dennis.
[EMAIL PROTECTED] wrote:
I've tried the method Mehmet but still no success with this goal
(select every first TD on every TR.
Maybe im doing something wrong, but can someone assure if this code is
in
The solution is what Klaus posted - you just have to use :first-child.
$(td:first-child).addClass(tomas);
--John
On 6/8/07, jorgeBadaBing [EMAIL PROTECTED] wrote:
I have been looking online at the documentation and don't seen to have
any luck find a way of doing this.
So far I can do this:
Err, I meant Karl - sorry!
On 6/30/07, John Resig [EMAIL PROTECTED] wrote:
The solution is what Klaus posted - you just have to use :first-child.
$(td:first-child).addClass(tomas);
--John
On 6/8/07, jorgeBadaBing [EMAIL PROTECTED] wrote:
I have been looking online at the documentation and
one more solution - $(tr).find(td:eq(0)).addClass(someClass);
On 6/30/07, John Resig [EMAIL PROTECTED] wrote:
Err, I meant Karl - sorry!
On 6/30/07, John Resig [EMAIL PROTECTED] wrote:
The solution is what Klaus posted - you just have to use :first-child.
Hey John,
No need to apologize to me. I take it as a compliment! :-)
--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Jun 30, 2007, at 1:41 PM, John Resig wrote:
Err, I meant Karl - sorry!
On 6/30/07, John Resig [EMAIL PROTECTED] wrote:
The solution
$(tr).each(function() {
$(TD, $(this)).get(0).addClass(tomas)
});
On Jun 8, 6:40 pm, Karl Swedberg [EMAIL PROTECTED] wrote:
$('tr td').addClass(tomas);
actually, that will select all td elements that are children of a
tr element -- in other words, all td elements.
Try this instead:
$('tr td').addClass(tomas);
actually, that will select all td elements that are children of a
tr element -- in other words, all td elements.
Try this instead:
$('td:first-child').addClass('tomas');
That selects all td elements that are the first child of their
parent element.
This
8 matches
Mail list logo