hook_js_alter
- Versions
- 7
hook_js_alter(&$javascript)
Perform necessary alterations to the JavaScript before it is presented on the page.
See also
@see drupal_get_js()
See also
Parameters
$javascript An array of all JavaScript being presented on the page.
Related topics
Code
modules/system/system.api.php, line 387
<?php
function hook_js_alter(&$javascript) {
// Swap out jQuery to use an updated version of the library.
$javascript['misc/jquery.js']['data'] = drupal_get_path('module', 'jquery_update') . '/jquery.js';
}
?>Login or register to post comments 