Here is the code to add event
$(document).on({ click: function() { $(this).hide(); $(\'#form_name\').removeClass(\'hide\');
You can also try using the event.preventDefault() functionality. It is described in more detail here: http://api.jquery.com/event.preventdefault/