On Feb 2, 2009, at 10:37 PM, Karl Swedberg wrote:
On Feb 2, 2009, at 6:47 PM, Slafs wrote:
Karl thanks for your tutorial. But it seems that examples for adding
the selected class doesn't work when I click the row but only the
checkbox itself
Well, that is very strange. It works with jQuery
On Feb 3, 2009, at 9:32 PM, Dave Methvin wrote:
Thanks a lot for pointing out the problem in the tutorial. I have
fixed it to work for 1.3.1:
Hey Karl, it looks like something got messed up on that page. Maybe
the css is missing?
Wow, that was a colossal failure! Yeah, my minifier didn't
> Thanks a lot for pointing out the problem in the tutorial. I have
> fixed it to work for 1.3.1:
Hey Karl, it looks like something got messed up on that page. Maybe
the css is missing?
On Feb 3, 2009, at 9:19 AM, Dave Methvin wrote:
Well, that is very strange. It works with jQuery 1.2.6, but not with
1.3.1. Hmm. Will have to investigate.
Most likely the problem is that .trigger()ed clicks bubble in 1.3 but
they didn't in 1.2, and it's bubbling back up to the tr.
Yeah, th
Hello again,
Thanks a lot for pointing out the problem in the tutorial. I have
fixed it to work for 1.3.1:
http://www.learningjquery.com/2008/12/quick-tip-click-table-row-to-trigger-a-checkbox-click#update1
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
O
> Well, that is very strange. It works with jQuery 1.2.6, but not with
> 1.3.1. Hmm. Will have to investigate.
Most likely the problem is that .trigger()ed clicks bubble in 1.3 but
they didn't in 1.2, and it's bubbling back up to the tr.
On Feb 2, 2009, at 6:47 PM, Slafs wrote:
Karl thanks for your tutorial. But it seems that examples for adding
the selected class doesn't work when I click the row but only the
checkbox itself
Well, that is very strange. It works with jQuery 1.2.6, but not with
1.3.1. Hmm. Will have to inve
Hi!
Thank you all for your replies!
With a big help from my friend now i've got this:
$(".myTable tr").each(function() {
var tr = $(this);
var input = $("input[type=checkbox]", tr);
tr.click(function() {
input.attr('checked',
Another method that I use to do the very same thing (1.2.6)
$('tbody tr').click( function(event) {
if ($(event.target).is('input')) {
return;
}
var $input = $(this).find('input');
if ($input.length)
Yeah, what Dave said.
Also, I wrote a tutorial a couple months ago about this very topic:
http://www.learningjquery.com/2008/12/quick-tip-click-table-row-to-trigger-a-checkbox-click
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Feb 1, 2009, at 4:20 PM, Da
And yet, another way using jQuery-1.2.6. Like Dave Methvin said,
there is prolly many ways to do it...
var checkIt = function(){
if ($(this).siblings().children().filter(":checkbox").attr
("checked")==false) {
$(this).siblings().children().filter(":checkbox").attr
("checked","checke
> now the checkbox itself doesn't have the ability to check or uncheck
What's happening is that when you click the checkbox directly, it
changes the state of the checkbox. But, the click event then bubbles
to the tr, where the handler changes it (back)!
There are several different ways to handle
I'm one step closer ;].
I'm traversing from tr not from td. And it seems to work fine except
that now the checkbox itself doesn't have the ability to check or
uncheck so i've tried to add some more code ([1]) but then I have to
doublecklick it to check or unckeck =/
weird...
my code:
---
13 matches
Mail list logo