I am trying to change the attr function in jQuery core (V.6.1).
I have a plugins.js file that is included in the page after the jquery-6.1.js file. The plugins.js file contains improvements made to various basic jQuery functions to accommodate some SVG functions.
I copied the attr function to the plugins.js file without modifying it, but now it causes a JavaScript error when it is called.
Does anyone know why this particular function does not like overwriting (I probably rewrite it wrong):
(function($){ $.fn.attr = function( elem, name, value, pass ){ var nType = elem.nodeType;
Steve source share