hello ,

I am using Drupal 6 in my project and i am need to upgrade jquery version library jquery.min.js - 1.3.2 to library jquery.min.js -1.82.
so please suggest me .

Thanks

Comments

ravi.khetri’s picture

HI Sushil

You can update your Jquery version by this method
Swapping jquery with preprocess page
This method has the advantage that it is specific for your theme, so if you use a different backend theme for the administration of your site, you normally should not have any problems with core js files not working anymore.

<?php
function yourModuleOrThemeName_preprocess_page(&$variables) {
  // exclude backend pages to avoid core js not working anymore
  // you could also just use a backend theme to avoid this
  if (arg(0) != 'admin' || !(arg(1) == 'add' && arg(2) == 'edit') || arg(0) != 'panels' || arg(0) != 'ctools') {
    $scripts = drupal_add_js();

    $new_jquery = array('sites/all/themes/YOURTHEME/js/jquery-1.7.1.min.js' => $scripts['core']['misc/jquery.js']);
    $scripts['core'] = array_merge($new_jquery, $scripts['core']);
    unset($scripts['core']['misc/jquery.js']);

    $vars['scripts'] = drupal_get_js('header', $scripts);
  }
}
?>
ravi.khetri’s picture

Issue summary: View changes

jquer upgrade

sushilkr’s picture

aiphes’s picture

i suscribe to your issue, and would to know if this solution could be used for a multisite install and affect all websites ? because i would to update to jquery 1.4.2

markhalliwell’s picture

Component: User interface » Code
Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 6 reached EOL (end-of-life) on February 24, 2016.