I have a problem using jQuery with native JavaScript ( NOT prototype.js). When using the following jQuery 1.9.1 code with an error message:
Object.prototype.myVeryGreatFunction = function() {
When I remove the prototype definition, everything works fine. Unfortunately, I cannot easily upgrade jQuery because it is a plugin for CMS, so it should work with older versions for compatibility reasons.
Is there any known issue with this or a fix for this?
Googling actually shows me solutions like using jQuery.noConflict() and closing private functions. But, as mentioned above, I am not using prototype.js prototype, but native .
javascript jquery prototype conflict
Julian F. Weinert
source share