jQuery plugin to override proper $.fn.attr method to return all attributes if no arguments provided.
JavaScript CSS CoffeeScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
libs
src
test
.gitignore
.jshintrc
.travis.yml
CONTRIBUTING.md
Gruntfile.js
LICENSE
LICENSE-MIT
README.md
allAttributes.jquery.json
bower.json
package.json

README.md

jQuery All Attributes

jQuery plugin to override proper $.fn.attr method to return all attributes if no arguments provided.

Build Status

Getting Started

<script src="jquery.js"></script>
<script src="dist/allAttributes.min.js"></script>

Examples

<a id="test"
   href="#foo"
   data-foo-bar="1"
   data-foo-bar-baz="qux"
   data-foo-bar-baz2="true">Yay</a>
$("a#test").attr();
// { href: "#foo", data: { foo: bar: { _: 1, baz: "qux", baz2: true } } }

Testing

$ npm install
$ npm test

Author

License

MIT License