Created
March 5, 2013 18:11
-
-
Save micahredding/5092638 to your computer and use it in GitHub Desktop.
how to switch jquery versions ONLY for the frontside theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Unset jquery, add back in the upgraded version, compatible with Bootstrap */ | |
/* since this happens at the theme level, Drupal's admin theme can use the old version */ | |
function THEMENAME_js_alter(&$javascript) { | |
unset($javascript['misc/jquery.js']); | |
} | |
function THEMENAME_preprocess_page(&$variables,$hook) { | |
/* Unset jquery, add back in the upgraded version, compatible with Bootstrap */ | |
/* since this happens at the theme level, Drupal's admin theme can use the old version */ | |
drupal_add_js(drupal_get_path('theme', 'THEMENAME') . '/assets/js/vendor/jquery/1.7/jquery.min.js', array('group' => -200, 'weight' => -100)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment