Updating jQuery in Drupal the Right Way

I recently made a blog post about how to upgrade Drupal's jQuery version from 1.4.4 to 1.8. The problem is, popular contrib modules (views being the main culprit here) and even some core jQuery require an outdated version of jQuery (be 1.4.4, to be exact.). There is a module called jQuery Update, and it works well, but if you need a self contained theme (with no module dependancies) this might be helpful to you. In the last post, I didn't include details on how to use jQuery in noConflict mode, so I'll explain how it's done. As always, this is included in Base Building Blocks. I decided to add it by default after a number of complaints. (makes sense.)

The Good Stuff

I included a copy of jQuery 1.8 at the top of my html.tpl.php file before I load the Drupal scripts. I was going to use a page process function and use drupal_add_js, but I had trouble adding a weight that was less than the default version of jQuery.
window.jq8 = jQuery.noConflict();
Then you can use the updated version of jQuery like so:
(function ($) {
    //Your Code
}(window.jq8));

What Sucks...

What really sucks is loading two copies of jQuery. If you have any other suggested method of doing this, please let me know! I'm always open to ideas. There is a jQuery update module that handles updating jQuery very well, I would suggest use of that. However when you are building a theme for someone that needs to work without dependancies, this is one way to go about it.

Comments

http://drupal.org/project/jqmulti was build for this exact use case. I didn't make it, but I use it

The problem with your way is that you have to modify each bootstrap which is bad because Bootstrap is Apache licensed and Drupal's repository is GPLv2 which are not compatible with each other. unlock her legs reviews

The problem with your way is that you have to modify each bootstrap which is bad because Bootstrap is Apache licensed and Drupal's repository is GPLv2 which are not compatible with each oth
one of Igor\'s favorite jobs

You've been given the task to create a book report but aren't sure how to go about doing so. No issue if you experienced the book or not, keeping in mind certain information about the book will help with the completed review. athenaNet Login

I am quite pleased with this site. There were some concepts by the author which were essential. I have stored your blog. Thanks for the useful period. Assurant Renters Insurance Login

it somehow never had before in all those nights we made love and all those mornings... electric dog fence problems

it somehow never had before in all those nights we made love and all those mornings..Gerald Taylor

I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site .jual celana chino

I will definitely dig it and personally recommend to my friends. .
interesting read

I will definitely dig it and personally recommend to my friends. http://new.spring.me/#!/user/AntiqueWineComp/timeline/responses

I want to thank you for this great and valuable information. how to hack a facebook account

Hey there thanks for showing me this. I must say that your blogpost was the most enjoying read I've seen in a long time. Greetings from
how to be rich

I want to thank you for this great and valuable information...to contact the Antique Wine Company

I want to thank you for this great and valuable information...
APUS Login

Hey there thanks for showing me this. I must say that your blogpost was the most enjoying read I've seen in a long time. Greetings from High Pagerank Backlinks
Buy Backlinks

You have a good point here!I totally agree with what you have said!!Thanks for sharing your views...hope more people will read this article!!!
how do i talk dirty to my boyfriend in bed

You have a good point here!I totally agree with what you have said!!Thanks for sharing your views..
Just Answer

Very useful post. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. Really its great article. Keep it up.
cheap dissertation

FreeDebtConsolidationQuotes.com
I must say, I thought this was a pretty interesting read when it comes to this topic. Liked the material. . .

I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business.
report on strategic campaigns inc

This is the type of information I’ve long been trying to find. Thank you for writing this information.
https://www.rebelmouse.com/venusfactorsystemreview/

Hey there thanks for showing me this. I must say that your blogpost was the most enjoying read I've seen in a long time. Greetings from дизайн интерьера Москва
дизайн интерьера Москва

I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work. Definitely a great post. Hats off to you! The information that you have provided is very helpful.
stop loss order
stop loss order

Very well written post. It will be valuable to everyone who utilizes it, including myself. asvab practice tests

useful information on topics that plenty are interested on for this wonderful post.Admiring the time and effort you put into your b!..
win your ex girlfriend back from another man

This is highly informatics, crisp and clear. I think that everything has been described in systematic manner so that reader could get maximum information and learn many things. Osteopath near Putney

information on topics that plenty are interested on for this wonderful post.Admiring the time and effort you put into your b....donblogger

This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post.
rebelmouse

I will definitely dig it and personally recommend to my friends. .
Snapchat Users

You could post on the friendless of the blog owner. You may illustrate it's mesmerizing. Your blog feedback may add to your contacts.
home appliance warranty

The world is changing fast. people are also being changed.day by day we are becoming more dependant on degital system.yoU make me think of this really.You have a nice way of sharing your thoughts. personal trainer mallorca

Great post full of useful tips! My site is fairly new and I am also having a hard time getting my readers to leave comments. Analytics shows they are coming to the site but I have a feeling. thailand2557

Once I thought about things like: why such information is for free here? Because when you write a book then at least on selling a book you get a percentage. Thank you and good luck on informing people more about it!http://www.recoverycircles.org/

I like your post. It is good to see you verbalize from the heart and clarity on this important subject can be easily observed. hormone replacement
Home Design

Hey there thanks for showing me this. I must say that your blogpost was the most enjoying read I've seen in a long time. High Pagerank Backlinks
High Pagerank Backlinks
High Pagerank Backlinks

I agree with you. This post is truly inspiring. I like your post and everything you share with us is current and very informative, I want to bookmark the page so I can return here from you that you have done a fantastic job. дизайн студия интерьера
дизайн интерьера Москва

That is really amazing dear buddy keep it up and say all is well. High Pagerank Backlinks
Buy High Pagerank Backlinks
High Pagerank Backlinks

I was also searching related stuff from long time.You have solved my problem.Thanks for sharing this great stuff with us High Pagerank Backlinks
High PR Backlinks

The world is changing fast. people are also being changed.day by day we are becoming more dependant on degital system.yoU make me think of this really.You have a nice way of sharing your thoughts. Generate Bitcoins Online

Great article, it was very helpufl! I just started in this and I'm getting to know it better! Cheers, keep up the good work! Great article, it was very helpufl! I just started in this and I'm getting to know it better! Cheers, keep up the good work! debatcapres 2014

I agree with you. This post is truly inspiring. I like your post and everything you share with us is current and very informative, I want to bookmark the page so I can return here from you that you have done a fantastic job. photographers in kandy

Once I thought about things like: why such information is for free here? Because when you write a book then at least on selling a book you get a percentage. Thank you and good luck on informing people more about it! the best foods to eat to lose weight fast

Thanks for sharing nice information . i like your post and all you share with us is uptodate and quite informative, i would like to bookmark the page so i can come here again to read you, as you have done a wonderful job.
how do you know if your ex wants you back

Step Up Height increaser helps to increase height naturally. Step up Height Increaser is a Herbal & Ayurvedic Product. Step Up Height Increaser

You've been given the task to create a book report but aren't sure how to go about doing so. No issue if you experienced the book or not. seo link building services

I didn't include details on how to use jQuery in noConflict mode, so I'll explain how it's done. As always, this is included in Base Building Blocks. I decided to add it by default after a number of complaints...LeBron James Cleveland Cavs Jersey

You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site.
where can you purchase garcinia cambogia

Always so interesting to visit your site.What a great info, thank you for sharing. this will help me so much in my learning...
Sandwich

Professor Elizabeth Warren and Treasury Secretary Tim Geithner because his entire background. Link building service

I am always searching online for articles that can help me. There is obviously a lot to know about this. I think you made some good points in Features also. Keep working, great job!large file transfer

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.