Next Tutorial

Drupal 7 Tutorial Part 19: Understanding Drupal 7 Content Types & Fields Concepts !

How to alter Javascript Files loaded on a Page in Drupal 7 ?

Submitted by anilsagar on Wed, 05/30/2012 - 12:42

Dear Drupalers,

If you would like to remove some of the Javascript files loaded on a page or Swap the Javascript files with some other files dynamically on page load then you need to learn about hook_js_alter.

Hook_js_alter allows to change the Javascript files on different pages. For Example if you would like to avoid a particular Javascript file on Home Page or any other page you can use this hook to alter list of Javascript files loaded on Page.

For more information http://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_js_alter/7

 

Cheers,

Anil Sagar

1 comment

hihi

Submitted by mandy (not verified) on Thu, 07/19/2012 - 01:52.

toller blog :D

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image. Ignore spaces and be careful about upper and lower case.
©2010 AnilSagar. All rights reserved. Drupal theme by Kiwi Themes.