Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/nathco/jQuery.mousetip

Extension for cursor tooltips that follow mouse movement
https://github.com/nathco/jQuery.mousetip

Last synced: 17 days ago
JSON representation

Extension for cursor tooltips that follow mouse movement

Awesome Lists containing this project

README

        

# jQuery.mousetip
Lightweight jQuery extension for creating cursor tooltips that follow mouse movement and position.

## Installation
Include the latest version of [jQuery](http://jquery.com/download) and `jQuery.mousetip.js` in the `` of your HTML document:
```html

```
## How to Use
Create an element with a class name `tip` and call the `mousetip()` method on the parent of said element. Modify the `x` and `y` parameters to change the tip position relative to the mouse cursor.
See the live demo: [code.nath.co/mousetip](http://code.nath.co/mousetip)

**HTML**
```html

ContentMousetip 1

ContentMousetip 2

ContentMousetip 3

```

**jQuery**
```javascript
$(function() {

// Default
$('div').mousetip('.tip');

// Custom Position
$('div').mousetip('.tip', 20, 30);

});
```

**CSS**
```css
span.tip {

/* Required */
position: absolute;
z-index: 2;
display: none;

/* Optional */
font-size: 15px;
max-width: 150px;
height: auto;
padding: 10px;
border-radius: 3px;
box-shadow: 0 1px 2px #666;
background: #FD0;
}
```

## Feedback
If you discover any issues or have questions regarding usage, please send a message to [[email protected]](mailto:[email protected]) or find me on GitHub [@nathco](https://github.com/nathco).