Skip to content Skip to sidebar Skip to footer

Mootools Extends The "function" Class With An "extend" Method Making Jquery Unusable

Mootools extends the 'Function' class and adds a new method called 'extend' in it. Now jQuery tries to add 'extend' function using jQuery.prototype.extend. However since 'extend' i

Solution 1:

The only way I can think to do that:

<scripttype="text/javascript">// copy the original functionvar ext = Function.prototype.extend;
    // remove itdeleteFunction.prototype.extend;
</script><scripttype="text/javascript"src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script><scripttype="text/javascript">// Copy the jQuery versionvar jqext = jQuery.prototype.extend;
    // remove it (for sanity).delete jQuery.prototype.extend;

    // reassign the original function.Function.prototype.extend = ext;
    // remove the jQuery extend method (now the original Function.extend method)delete jQuery.prototype.extend;
    // reassign jQuery's original extend method.
    jQuery.prototype.extend = jqext;
</script>

Solution 2:

Have you tried jQery.noConflict ? http://api.jquery.com/jQuery.noConflict/

Post a Comment for "Mootools Extends The "function" Class With An "extend" Method Making Jquery Unusable"