Bind handler on page change or user click?
===

I'm making a voting application: http://i.imgur.com/Oeh0i.png

The app uses `sammy.js` to load candidates info into the main page when a post (sidebar) is clicked. I've run into a small problem - I cant understand how to store the votes for a particular post in a temp javscript variable. As in, should I update the `votes_array` whenever a candidate is selected or should I bind a handler to the event of clicking on a new post. I tried the latter but that doesn't seem to work quite well. This is what I have:

    this.get('#/:post_id', function(context){
        context.app.swap('');
        this.load('/post/' +  this.params['post_id'])
            .then(function(candidates){
                //Use post data generated to add help_text for each post generated
                $('.post_heading').text(candidates[0][0]["post_name"]);
                $('.post_heading').data("post_id", candidates[0][0]["post_id"]);
                $.each(candidates[1], function(i, candidate){
                    context.render("static/templates/candidate.template", {candidate:candidate})
                    .appendTo(context.$element());
                });
        });
        this.trigger('addVotesInArray');
    });
    
    this.bind('addVotesInArray', function(){
        current_post_id = $('.post_heading').data("post_id");
        candidate_username = $('.candidate_selected').data("username");
        console.log("post_id = " + current_post_id + "; candidate = " + candidate_username);
        //output: post_id=1; candidate=undefined
        //this should instead be 
        //output: post_id=1; candidate=<candidate_username>
    });

This is my first app using a Javascript MVC and I'm really clueless about the "right" ways to do a number of things. Really appreciate a few pointers. Thanks a lot