You are here

function resp_img_add_js in Responsive images and styles 8

Same name and namespace in other branches
  1. 7.2 resp_img.module \resp_img_add_js()
  2. 7 resp_img.module \resp_img_add_js()

Add javascript for older browser support

1 call to resp_img_add_js()
theme_picture_formatter in ./resp_img.module

File

./resp_img.module, line 14

Code

function resp_img_add_js() {
  static $added = FALSE;
  if (!$added) {
    $added = TRUE;
    drupal_add_js(drupal_get_path('module', 'resp_img') . '/picturefill/matchmedia.js', array(
      'type' => 'file',
      'weight' => -10,
      'group' => JS_DEFAULT,
    ));
    drupal_add_js(drupal_get_path('module', 'resp_img') . '/picturefill/picturefill.js', array(
      'type' => 'file',
      'weight' => -10,
      'group' => JS_DEFAULT,
    ));
    drupal_add_css(drupal_get_path('module', 'resp_img') . '/css/resp_img.css', array(
      'type' => 'file',
      'weight' => -10,
    ));
  }
}