jQuery problem click function
Try this as per drupal standard

(function ($) {
  Drupal.behaviors.exampleModule = {
    attach: function (context, settings) {
      $('body', context).click(function () {
        alert("test");
      });
    }
  };
})(jQuery);


Go through with Managing JavaScript in Drupal 7 for more information