This project is read-only.

jQuery library blocks comments

Topics: Themes
Jun 20, 2008 at 5:27 AM
In my theme, I'm using jQuery to build some client side ajax calls, UI effects, etc... Even though I'm running jQuery in no conflict mode (i.e var $j = jQuery.noConflict();), comments are broken as long as the jQuery library is included on the page.

I include the jQuery library (version 1.2.6) in the site.master file. If I remove the reference, the comments work fine (as long as the Akismet extension is not installed). If the jQuery library is included, clicking the Save Comment button does nothing.

Obviously there is a conflict somewhere. What can I hack to get comments working while using the jQuery library?

Jun 20, 2008 at 6:07 AM
Ok, for anyone who runs into this problem in the future. It turns out that it wasn't the mere fact of referencing the jQuery library.

I generally write my jQuery code near the </body> tag. For some reason, BlogEngine didn't like this, and it broke comments. So I moved my jQuery script block to the <head> section, and viola! it worked.

Hopefully by sharing this, others won't have to go through the pains I did. ;D