I have a table that when tr are clicked drops down another table as of right now i have the tr with a hover color in place of banded the rows. I set up the javascript to change the background color when you click the tr but is there a way to edit the css back to the default
var parent = $('.surveyResponses');
$('.data[question]', parent).on({
'click' : function(){
var clicked = $(this);
$('[question='+clicked.attr('question')+']',parent).eq(1).slideToggle('slow', function(){
if ( $('[question='+clicked.attr('question')+']',parent).eq(1).css('display') == 'block' ) {
clicked.css('backgroundColor', '#535353');
}
else{
clicked.css('backgroundColor', '#747373');
clicked.css('backgroundColor:hover', '#535353');
}
});
}
});
if possible i would not want to make a jquery hover event
jsfiddle http://jsfiddle.net/Des58/1/