Skip to content

Libraries api

sinsunsan edited this page Oct 3, 2012 · 4 revisions

How to add a js stored in the library dir
http://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_get_path/7#comment-13414

Exemple with modernizr

<?php
drupal_add_js(libraries_get_path('modernizr') . '/js/modernizr-1.6.min.js', array('group' => JS_THEME, 'every_page' => TRUE));
?>

WIKI by Sébastien Lucas CEO & Funder or Bricks

Clone this wiki locally