You are here

function jscrollpane_init in JScrollPane 6.2

Same name and namespace in other branches
  1. 7 jscrollpane.module \jscrollpane_init()

Implementation of hook_init().

File

./jscrollpane.module, line 34
JavaScript based scrollable containers

Code

function jscrollpane_init() {
  static $include;
  if (!$include) {
    global $base_url;
    $path = $base_url . '/' . drupal_get_path('module', 'jscrollpane');
    drupal_add_js(array(
      'jScrollPane' => array(
        'class' => variable_get('jscrollpane_class', '.scroll-pane'),
      ),
    ), 'setting');
    drupal_add_css($path . '/css/jquery.jscrollpane.css');
    drupal_add_js($path . '/js/jquery.jscrollpane.min.js');
    drupal_add_js($path . '/js/jquery.mousewheel.js');
    drupal_add_js($path . '/js/script.js');
  }
}