jwarby / jquery-awesome-cursor

jQuery plugin for using FontAwesome icons as custom CSS cursors
https://jwarby.github.io/jquery-awesome-cursor/
MIT License
179 stars 69 forks source link

Data attributes API #6

Closed jwarby closed 9 years ago

jwarby commented 9 years ago

It might be nice to allow cursors to be configured via a data attributes API. I imagine the implementation would still require the user to initialise the cursor plugin however, in a similar fashion to how Bootstrap tooltips are implemented.

The API itself would just be a different interface to the options hash, e.g.:

<div data-ac-cursor="pencil" data-ac-color="red" data-ac-size="44"></div>

And then initialisation:

$('[data-ac-cursor]').awesomeCursor();
jwarby commented 9 years ago

Would be easy enough for someone to build this into their own project, so disregarding.