Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6329511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:40:52+00:00 2026-05-24T17:40:52+00:00

I’m in quite a pickle with a Jquery version bind. I need to have

  • 0

I’m in quite a pickle with a Jquery version bind. I need to have version 1.4.1 or higher on one specific page, to achieve a particular effect, and I don’t see a way to override the Drupal default verion of 1.2.6. for just the one page. The highest Drupal 6 can seem to handle is v1.3.2, which the JQ Update module swaps in sitewide.

So is there any way to override the JQ head tag for a particular page?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:40:53+00:00Added an answer on May 24, 2026 at 5:40 pm

    Here it is in a new module. This is copied and modified from the jquery update module.:

    /**
     * Implementation of hook_theme_registry_alter().
     *
     * Make my page preprocess function run *after* everything else's.
     */
    function my_module_theme_registry_alter(&$theme_registry) {
      if (isset($theme_registry['page'])) {
        // If jquery_update's preprocess function is there already, remove it.
        if ($key = array_search('jquery_update_preprocess_page', $theme_registry['page']['preprocess functions'])) {
          unset($theme_registry['page']['preprocess functions'][$key]);
        }
        // Now tack it on at the end so it runs after everything else.
        $theme_registry['page']['preprocess functions'][] = 'my_module_preprocess_page';
      } 
    }
    
    
    /**
     * Implementation of moduleName_preprocess_hook().
     *
     * Replace Drupal core's jquery.js with the new one from my module.
     */
    function my_module_preprocess_page(&$variables) {
      // Only do this for a specific page.
    $alias_array = explode('/', drupal_get_path_alias($_GET['q']));
    if($alias_array[0] == 'special_page') {
      // get the scripts from head.
        $scripts = drupal_add_js();
    
        $myreplacement = drupal_get_path('module', 'my_module').'/jquery-1.4.1.min.js';
    
        $new_jquery = array($myreplacement => $scripts['core']['misc/jquery.js']);
        $scripts['core'] = array_merge($new_jquery, $scripts['core']);
        unset($scripts['core']['misc/jquery.js']);
    
            $variables['scripts'] = drupal_get_js('header', $scripts);
        }
    
    }
    
    ?>
    

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have thousands of HTML files to process using Groovy/Java and I need to
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.