Switching jQuery versions

The following is just a small blurb from the post I wrote earlier today for a blog we’ve started at work among in the web team. You can go ahead and read more about it here.

“This is a snippet of code that I was working on this morning with the input of a coworker for the concept. Basically we needed to have a way to include a navbar at the top of every site, which includes javascript functionality, but also doesn’t conflict with already present jQuery libraries.”

Small note: In IE, you need the jQuery.noConflict() line to be separate from the rest of your snippet code if you want it to work. IE seems to have an issue with the XML connotation of CDATA Comments. It sucks. I swear I’mma just boycott them until they conform. Okay, I won’t, but it’s nice to dream. I don’t know why IE does this to be honest, it just does.

<script src=”js/jquery-1.4.2.js” type=”text/javascript” language=”javascript”></script>
<script>var $newJS = jQuery.noConflict();</script>
<script>alert(‘do a bunch of stuff here’);</script>

Leave a comment

0 Comments.

Leave a Reply


[ Ctrl + Enter ]