:-) Thanks for buying the book!
By the way, as John Resig can now attest, a portion of the proceeds
goes right back to the jQuery project. So, thanks for helping jQuery,
too. ;-)
One more thing (to avoid going totally OT):
I took the code that I wrote for you and dropped it into a page wi
Hi Karl,
I've just realised where I've seen your name before. On the spine of
the spine of the book sitting here on my desk :)
An excellent book it is too.
Jon
On Nov 26, 7:09 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Hi Jon,
>
> Here you go:
>
> $(document).ready(function() {
>$('.Gr
Thanks guys,
I have tried all the suggestions on here and have tried to adapt them
for my grid. I think I'm very close but for some reason alghout each
individual selector/traversal function seems to work in isolation,
none of it seems to work when I put it all together. Can anybody spot
any prob
Hi Jon,
Here you go:
$(document).ready(function() {
$('.Grid th').each(function(column) {
column ++;
$('input:checkbox', this).click(function() {
$('.Grid tbody tr td:nth-child(' + column + ')
input:checkbox').attr({checked: $(this).is(':checked') ? 'checked' :
''});
})
This is similar to another post.
Couple of demos:
http://www.commadot.com/jquery/rowindex.php
http://www.commadot.com/jquery/colIndex.php
Glen
On Nov 26, 2007 10:20 AM, Wizzud <[EMAIL PROTECTED]> wrote:
>
> Assuming you a single checkbox in each th cell...
>
> var thboxes = $('.Grid thead th inp
Assuming you a single checkbox in each th cell...
var thboxes = $('.Grid thead th input:checkbox');
thboxes.click(function(){
var colNum = thboxes.index(this) + 1;
// then your stuff...
$(".Grid tbody tr td:nth-child(" + colNum +
")input:checkbox").each(function() {
this.c
6 matches
Mail list logo