Set JS Queue

Component ID

2198835

Component name

Set JS Queue

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

192

Component created

Component changed

Component body

This module provides a function that acts identical to "drupal_add_js()" but will be stored in a session instead and be executed on the next page request (init).

This could be useful if you want to trigger an event after a redirect etc.

set_js_queue('js/script.js', array(
  'type' => 'file',
  'scope' => 'footer',
  'weight' => 3
));