Adding jQuery creates javascript error

Topics: ASP.NET 2.0, Themes
Jan 18, 2009 at 10:14 AM
I have added jQuery to my blogengine site.master page. I have used the no conflict method to get it to work where I use $j instead of the $ symbol.

$j = jQuery.noConflict();

$j(document).....

This technique was shown in the following blog post http://www.dscoduc.com/post/2008/09/24/jQuery-Goodness-for-BlogEngineNET.aspx.

After I do this I start getting the following javascript error on the page when I load any page.

$ is not a function
HightLightXfn()js.axd?p...v=1.4.5.0 (line 12)
onload()()js.axd?p...v=1.4.5.0 (line 14)
return new XMLHttpRequest();try{return n...tent = $('content');if (content == null)

Has anyone else experience this issue and/or know how to solve it?

Jan 18, 2009 at 10:25 AM
I resolved this by calling jQuery.noConflict() immediately after I include the jQuery library.