I want change the class in a table row when I click on it (i did it, i can see this change in the inspector of the navigator) but, when I change the class, the change is not refresh on the screen. I paste my code if it is more instructive:
I apologize in advance if the post is very long (and my engish).
Template.productValues.events({
‘click tr’: function(event, template){
/* @event: for events called @template: for manipulate the DOM of temeplate
*/
event.preventDefault();
//To click on the row change the class
if(template.$(‘tr’).hasClass(’.not-selected-row’)){
template.$(‘tr’).removeClass(’.not-selected-row’).addClass(’.selected-row’);
}else{
template.$(‘tr’).removeClass(’.selected-row’).addClass(’.not-selected-row’);
}
}
});
Template.productValues.events({
‘click tr’: function(event, template){
/* @event: for events called @template: for manipulate the DOM of temeplate
*/
event.preventDefault();
var selectedRow=Session.get(‘selectedRow’);