$(\".container\").on(\"contextmenu\", \".photos-bottom .albums li\", function(e) {
$(\'html\').bind(\'click\', function (event) {
alert(id);
});
return false;
Because your click event is being bound every time a context menu event occurs, you're actually adding an additional bind each time you right click. This is the reason for the ever-growing number of event executions.
You should either:
a) unbind the event when the context menu is closed, or
b) bind the click event outside of your contextmenu callback function.
$('html').unbind('click').bind('click')
fixed it.