so here's what I would up doing. The data is coming from the django template. i added this after the {% for result in results %} template tag in the admin/change_list_results.html template:
<script type="text/javascript"> $(document).ready(function(){ var column = 12 $('img[alt="1"]').parent().filter('td:nth-child('+ (column) +')').parent().css("background","#9FFF9F"); }); </script> and it works like a charm;-P On Mar 16, 3:55 pm, ricardobeat <ricardob...@gmail.com> wrote: > Assuming you have this: > > <table id="dj"> > <tbody class="options"> > <tr> > <td>Something here</td> > <td><input type="checkbox" /></td> > <tr> > </tbody> > </table> > > You'd use this javascript: > > $('#dj .options tr').each(function(){ > var self = $(this); > self.find(':checkbox').click(function(){ > self.toggleClass('selected') > }); > > }); > > I don't know if it's possible for the click event to fire on the > checkbox without it's value changing. If that happens you can use this > instead of toggleClass: > > this.checked > ? self.addClass('selected') > : self.removeClass('selected'); > > And this CSS: > > #dj .options tr.selected { background-color: #0FC } > > cheers, > - ricardo > On Mar 16, 12:25 pm, bsisco <blake.si...@gmail.com> wrote: > > > I have a django app where i have a model which contains a boolean > > (checkbox) field. What i would like to do is change the corresponding > > table row color in the admin table based on whether or not this field > > is checked. i have come to the conclusion that this is only possible > > with jquery. i am a complete n00b when it comes to jquery so i was > > looking for some guidance/suggestions on how i might be able to > > accomplish this. > > > Cheers