$(\'.ajax\').click ( function() { // If been bound then we need to return here. alert(\':D\'); } ) $(\'.ajax\').click (
Simplest solution from here bind event only once
Copied code sample:
function someMethod() { $(obj).off('click').on('click', function(e) { // put your logic in here }); }