You are here

Jquery $(document).ready( function() is not working in Drupal 7

Jquery document.ready function is bit different than in Drupal 6.

In Drupal 6, we simple add the document.ready function and it works like:



$(document).ready(function() {

});

But in Drupal 7, there are some change in the API, to make document.ready working in Drupal 7 and function before the document.ready as:



(function ($) {

$(document).ready(function() {

});

})(jQuery);

Website fix request form

If you have problems with the website based on Drupal or WordPress, please feel free to contact us: