Keyword

js Error

  • piperchick
  • piperchick's Avatar Topic Author
  • Offline
  • Premium Member
More
14 years 5 months ago #81790 by piperchick
js Error was created by piperchick
Hi,I was trying to get JomSocial working and they investigated my site and said the following:There's actually a javascript error on your site that causes our
javascript to fail as well. It is coming from k2.js
$("comment-form").addEvent is not a function<br/>[Break on this error]
$('comment-form').addEvent('submit', function(e){

Is there any way to fix this?Thnaks.

Please Log in or Create an account to join the conversation.

More
13 years 2 months ago #81791 by Francesc Llorens
Replied by Francesc Llorens on topic js Error
I had the same problem; it was originated by a conflict between MooTools and Jquery.

(See this post for insights about the problem:preventing-jquery-and-mootools )

 

I put a line calling JQuery 1.4.2 on the index.php of my template. Then, the familiar error of the blank page with the "refreshing" tex after k2 comment showed.

 

Also, the error console showed an error from k2.js, "$("comment-form").addEvent is not a function".

 

So I've ripped off the line calling the jquery, installed the JB Library plugin from Joomla Baboo (JB Library)  and on the plugin parametres I chose the JQuery I was trying to load.  The remove parameters and Mootools parameters weren't changed.

 

Now my template works perfect.

 

So, the problem is a JQuery conflict, search carefully what javascript libraries you load.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum