Search code examples
jquerymagentoprototypejsconflict

$.extend is not a function


I'm trying to integrate the svg edit - editor, which is using jQuery, into Magento. The problem is that Magento uses Prototype, and therefore I'm using the jQuery.noConflict(); method. Everything is fine until if I call the editor via function then Firebug throws the following errors:

$.extend is not a function

if(config) {
   $.extend(curConfig, config);
} 

$.isArray is not a function

} else if($.isArray(key)) {

The error occurs at line 59 and 121 in svgcanvas.js. I hope someone with more experience in using jquery and prototype can help me with this problem.


Solution

  • Try: jQuery.extend(curConfig, config);