You are here

function parallax_bg_init in Parallax Background 7

Implements hook_init().

File

./parallax_bg.module, line 12
Basic Module file.

Code

function parallax_bg_init() {
  $module_path = drupal_get_path('module', 'parallax_bg');
  $settings = variable_get('parallax_bg_settings');
  if (isset($settings['triggers_fieldset'])) {
    $js_vars = drupal_json_encode($settings['triggers_fieldset']);
    drupal_add_js(array(
      'parallax_bg' => $settings,
    ), 'setting');
    drupal_add_js($module_path . '/parallax_bg.js');
    drupal_add_js($module_path . '/js/jquery.scrollTo.js');
    drupal_add_js($module_path . '/js/jquery.parallax.js');
  }
}