jQuery.js not loading after enabling custom module I have written my custom module for Drupal 7. In my page_change.module file I have only:

&lt;?php
    drupal_add_js(drupal_get_path('module', 'page_change') . '/page_change.js');
?&gt;


In my page_change.js file I have only:

Drupal.behaviors.page_change = {
    attach: function (context) {
        console.log("text");
    }
};


As soon as I enable my module, Drupal doesn't load jquery.js. It does not even appear in html source in &lt;head&gt; section. When I disable my module, or delete the only line from page_change.module file everything works fine.

I have also tried to load my javascript file by adding

scripts[] = page_change.js


In my page_change.info file (and leaving page_change.module with only &lt;?php ?&gt;) but it doesn't seem to work either.

Why does that happen? What am I doing wrong? Am I missing something?

edit: I have even tried to add inline javascript by adding

drupal_add_js('console.log("text");', array('type' =&gt; 'inline', 'scope' =&gt; 'footer'));


and it writes text to console, but jquery.js is still missing.
Your custom JS should be wrapped in:

(function($) {
  // custom Drupal behaviors here
})(jQuery);


Give that a shot.