Reputation: 2974
I'm trying to update my drupal jquery1.4 to jquery1.8. I tried by using following way.
function oxavd_js_alter(&$javascript) {
//We define the path of our new jquery core file
//assuming we are using the minified version 1.8
$jquery_path = drupal_get_path('theme','oxavd') . '/js/jquery-1.8.0.min.js';
//We duplicate the important information from the Drupal one
$javascript[$jquery_path] = $javascript['misc/jquery.js'];
//..and we update the information that we care about
$javascript[$jquery_path]['version'] = '1.8.0';
$javascript[$jquery_path]['data'] = $jquery_path;
//Then we remove the Drupal core version
unset($javascript['misc/jquery.js']);
}
I referred this from here
But this wasn't worked for me. It shows version 1.4.4
<script type="text/javascript" src=".../misc/jquery.js?v=1.4.4"></script>
Any help would be appreciated.
Upvotes: 0
Views: 1329