Or, don't add an ID;
(PSEUDO, UNTESTED CODE ALERT)
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("a").click(function() {
// Get all current "highlighted rows", of THIS table.
objCurrent = jQuery("tr.highlight",
jQuery(this).parents("table")[0]);
// Did we have a previous selection?
blnChanged = (objCurrent.length > 0);
// Remove old clases
if (blnChanged) {
objCurrent.removeClass("highlight");
// .. ajax call to remove selection .. e.g.
serialize it ??
}
// Select new row(s)
jQuery(this).parents("tr").addClass("highlight");
if (blnChanged) {
// .. ajax call here ..
}
}
});
</script>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/