Download & Extend

Code required by plugin causes clash with FCKEditor

Project:jCarousel
Version:5.x-1.3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I was having an issue with FCKEditor, and I traced it to jCarousel. It was caused by the following code that is required by the plugin:

<script type="text/javascript">
$(document).ready(function() {
  $('#mycarousel').jcarousel();
});
</script>

I had it in my page.tpl.php, and since jcarousel.js is only loaded on node pages, this call when it wasn't loaded caused an error, which caused problems with FCKEditor. I moved the code to jcarousel.js, and everything works fine now. However, there are probably better ways to do it such as adding it to the modele in jcarousel_nodeapi() with drupal_add_js(). I do know the call to $('#mycarousel').jcarousel() is required, because nothing works without it. If you think the addition to hook_nodeapi() is the way to go, I'm willing to roll a patch for it.

Comments

#1

Status:active» postponed (maintainer needs more info)

I'm clueless as to how this could cause conflicts with any other JS… So please explain how this causes problems!

#2

Me, too. All I know is when the code I referenced above is loaded in a page where the jcarousel.js has not been loaded, I get the issues with the smaller text field and missing editor (see my issue I referenced in the original post). I don't have the time to look at it right now, but I'll dig into it when I get a chance.

#3

Status:postponed (maintainer needs more info)» closed (fixed)

Closing due to lack of response.

nobody click here