I want to hide the all table rows that have a specific value for the custom 'grp' attibute.
This code works:

$('table.grouped tr.group').click(function() {

   var attrName = $(this).attr("grp");

   eval("$(this).siblings('[EMAIL PROTECTED]" + attrName + "]').toggle()");

   return false;

})

Basically, I get the 'grp' property value of the row that is clicked.
Then I toggle all siblings that have the same value for the grp attribute.

Question: Is there a way to do this without using the eval method?

More information:
I have an html table and I'm grouping the rows based on a column sort.
The result is a bunch of tr elements with the same 'grp' attribute value followed by another bunch of tr elements with the same 'grp' attribute value thus:
<tr grp="myAttr1">...
<tr grp="myAttr1">...
<tr grp="myAttr1">...

<tr grp="myAttr2">...
<tr grp="myAttr2">...
<tr grp="myAttr2">...
etc.

Thanks!

_________________________________________________________________
Find a local pizza place, movie theater, and moreĀ….then map the best route! http://maps.live.com/?icid=hmtag1&FORM=MGAC01


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to