$(document).ready(function(){ $('.greenButton').click(function(){ *!*register();*/!* }); $('#regForm').submit(function(e) { *!*register();*/!* e.preventDefault(); }); });