(function() { // This fixes $(...).attr() to work as expected with SVG elements. // Does not currently use *AttributeNS() since we rarely need that. // See http://api.jquery.com/attr/ for basic documentation of .attr() // Additional functionality: // - When getting attributes, a string that's a number is return as type number. // - If an array is supplied as first parameter, multiple values are returned // as an object with values for each given attributes var proxied = jQuery.fn.attr, svgns = "http://www.w3.org/2000/svg"; jQuery.fn.attr = function(key, value) { var len = this.length; if(!len) return proxied.apply(this, arguments); for(var i=0; i