Will "the Mighty" Strohl

Upgrading DotNetNuke to Use the Latest jQuery Version

DotNetNuke 5 was released using jQuery version 1.02.06.  However, jQuery was updated to version 1.03.01 since then.  While 1.03.01 is a bug patch, 1.03.00 has some really great features, like:

  • Upgraded/faster Selector Engine
  • Live Events
  • jQuery Event Object
  • HTML Injection Rewrite
  • Offset Rewrite
  • Removal of Browser Sniffing

There is more to note, but you probably get the point now.  For a full description of these, and all other fixes/features, visit the release log.

Now, you probably noticed from the title of this blog that I am going to talk to you about upgrading the version of jQuery that is currently in your DNN release.  Right now, that would mean upgrading from version 1.02.06 to 1.03.01.  This is not something that you should try on a whim, but it is also very easy to roll back.

DISCLAIMER: Upgrading jQuery is not supported by the DNN Core.  There are many things that may break since the newest version of jQuery has not been officially tested against DNN 5.  That being said, your own or 3rd party components/modules might also break.  It is also very possible that the next version of DNN might not have upgraded jQuery yet, therefore your upgrade might get overridden.

Okay...  We have gotten the formalities out of the way.  Let's upgrade jQuery!

You will find the current jQuery scripts in the following directory:  ~/Resources/Shared/Scripts/jQuery/

DNN jQuery Folder Location

Rename the existing jQuery files to jquery_backup.js, and jquery_backup.min.js, respectively.  This will make rolling back our changes very easy, should we need to do so.

Download the most current version of jQuery from their website, and place a copy in the folder specified above.  Then, rename the jQuery files, removing the version number from the file names.  For example, right now, one of the current files is jquery-1.3.1.js.  Rename it to jquery.js.

After you're done, your folder will now look like the following screen shot.

DNN jQuery Files Following Upgrade

Finally, view your website again, making sure that you clear out your local cache.  That's all there is too it!  :)

Useful Tip:  You can get intellisense for jQuery if you're using Visual Studio 2008.  Jeff King, the Program Manager for Visual Studio Web Tools, blogged about this.

Remember, this upgrade is not supported by the DNN Core.  However, you can indeed count on using a faster, leaner, meaner, more featured version of jQuery if you upgrade.

Technorati Tags: , , , , ,

blog comments powered by Disqus