by Juan Leyva.
I suppose that you use the function MM.tpl.render for rendering the template "discussionposts.html " , just after rendering the template you should add the code with the handler
In this case, I see that rate is a class not and id, be sure of that (in a previous post seems to be an element id not a class)
$(".rate").on('change', function() {
alert('this is to check');
});