You are here

function jquerymobile_load_files in jQuery Mobile module 7.2

Load the required files.

File

./jquerymobile.inc, line 70
Includes for jquerymobile

Code

function jquerymobile_load_files() {
  global $theme_key;
  drupal_add_library('jquerymobile', 'jquerymobile.jquery');
  drupal_add_js(_jquerymobile_build_js(), array(
    'type' => 'inline',
    'group' => JS_THEME,
    'weight' => 102,
  ));
  if (_jquerymobile_get_setting($theme_key, 'custom_themes') != NULL) {
    drupal_add_css(variable_get('jquerymobile_custom_path', drupal_get_path('theme', $theme_key) . '/styles/jquery.mobile.overrides.css'), array(
      'type' => 'file',
      'group' => CSS_THEME,
      'every_page' => TRUE,
      'media' => 'all',
      'preprocess' => FALSE,
      'weight' => 99,
    ));
    drupal_add_library('jquerymobile', 'jquerymobile.custom');
  }
  else {
    drupal_add_library('jquerymobile', 'jquerymobile');
  }
}