Upgrading your JQuery version


Hey ho everybody and thank you for viewing my code Snipp.

After a couple problems I had with the JQuery Update module I thought of an other solution to get drupal to a JQuery version that i want.

I tested out with the JQuery version 1.8 and lower. I dont know if the newest version is compatible with Drupal. But if someone tested it or knew more just leave a comment below.

For those who can not find an alder version of JQuery jsut download the JQuery Update module and take it from there.

Get raw version
  1. /**
  2.  * Implements hook_js_alter()
  3.  */
  5. function hook_js_alter(&$javascript) {
  6. // We swap out the orginal with the one we want.
  7. // It hasn't to be in the theme folder but it would make sense :D
  8. $javascript['misc/jquery.js']['data'] = drupal_get_path('theme', 'your_theme') . '/js/replace/jquery.min.js';
  9. }