A jQuery module to work with SVG attributes.
- License:
- MIT
- Source:
Methods
(static) jQueryAttr($) → {external:jQuery}
This fixes $(...).attr()
to work as expected with SVG elements.
Does not currently use *AttributeNS()
since we rarely need that.
Adds external:jQuery.fn.attr
.
See https://api.jquery.com/attr/ for basic documentation of .attr()
.
Additional functionality:
- When getting attributes, a string that's a number is returned as type number.
- If an array is supplied as the first parameter, multiple values are returned as an object with values for each given attribute.
Parameters:
Name | Type | Description |
---|---|---|
$ |
external:jQuery | The jQuery object to which to add the plug-in |
- Source:
Returns:
- Type
- external:jQuery
Type Definitions
Attributes
Type:
- PlainObject.<string, (string|Float)>
- Source: