Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dzervoudakes/jquery-mouseable

A delightfully !DOCTYPE-agnostic answer to hover/active states.
https://github.com/dzervoudakes/jquery-mouseable

Last synced: about 1 month ago
JSON representation

A delightfully !DOCTYPE-agnostic answer to hover/active states.

Awesome Lists containing this project

README

        

# jQuery-mouseable

_A delightfully !DOCTYPE-agnostic answer to hover/active states._

Dynamically adds hover and active classes to DOM elements for styling, removing the need for CSS :hover and :active pseudo classes. Unlike pseudo classes, this method is !DOCTYPE-agnostic.

##### Example:

```
$(selector).mouseable();
```

In the example above, the default hover class is "over" and the default active class is "down".

##### Example with custom hover/active classes:

```
$(selector).mouseable({
hoverClass: 'foo',
activeClass: 'bar'
});
```

In the example above, the hover class is user-defined as "foo" and the active class is user-defined as "bar".

*This plugin is optimized for both mouse events and touch events.*