drupal_add_js() is the function used for adding JavaScript to a Drupal page.
3
votes
3answers
2k views
How to unset javascripts in Drupal?
I wanted to unset some javascripts since they does nothing but conflict on my custom JS in my mobile theme.
What I did:
// Load all js scripts
$scripts = drupal_add_js();
// Unset all ...
1
vote
2answers
130 views
Adding JavaScript before drupal.js
I am trying to add jQuery to my page (it is not being added by default). The file is adding to the page but after drupal.js causing the error:
SCRIPT5009: 'jQuery' is undefined
drupal.js, line 5 ...
1
vote
1answer
857 views
Form API, drupal_add_js() and setting a JS variable
Consider
drupal_add_js(array(
'radio86_media' => array('barfoo' => 'booboo')), 'setting'
);
and
$form['#attached']['js'] = array(
drupal_get_path('module', 'radio86_media') . ...