I have a tr in my html like this
<link rel="stylesheet" type="text/css" href="some_file.css"> // at the head
<c:forEach var="some_variable" items="some_items">
<tr class="some_class"> some_variable </tr>
</c:forEach>
I also have a submit button
<input type="submit" value="submit" onclick="onSave()"/>
The on click with the button will trigger a function in external javascript
$( '.some_class' ).each( function() {
if( some condition which involve '.some_class' ) {
$( this ).addClass('another_class');
} else {
$( this ).removeClass('another_class');
}
});
The another class is from an external css which have
.another_class {
background-color: '#ffffb4';
}
I don't get it why the tr doesn't change the background-color when I added a class to the tr, what am I doing wrong?