Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/abernier/tip

A tooltip/dialog UI widget
https://github.com/abernier/tip

Last synced: 3 months ago
JSON representation

A tooltip/dialog UI widget

Awesome Lists containing this project

README

        

# Build

`make` will generate:

1. `dist/jquery.ui.tip[.min].js`
2. `dist/jquery.ui.tip.css`

# Load

1. The stylesheet:

``

2. The widget:

``

which has the following dependencies: [jquery](https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js), [jquery-ui](https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js), [jquery-tmpl](http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js)

# Use

$el.tip([])

: A list of options for a tip's widget instance.

{
[content: ]
[,closeButton: ]
[,target: ]
[,hook: ]
[,stem: ]
[,openOn: ]
[,closeOn: ]
[,addClass: ]
}

Default: {}

: The content for the tip.

'' | Deferred

Default: $el.attr('title')

: Whether to display a control to close the tip.

true | false

Default: true

: The element the tip is in relation to.

'selector' | jQuery | node

Default: $el

: Hooking allows you to place your tip anywhere in relation to your target elements. The concept is simple, you define two corners that you want to 'hook' to eachother. One on the target element, the other one on the tooltip.

{
[target: ]
[,tip: ]
}

:
:

: 'cc' | 'tl' | 'tc' | 'tr' | 'lt' | 'lc' | 'lb' | 'br' | 'bc' | 'bl' | 'lb'| 'lc' | 'lt'

Default: {
target: 'cc',
tip: 'cc'
}

: A way to show where the tip come from.

true | false

Default: false

:

' ...' | ['', '', ...]

Default: ''

:

' ...' | ['', '', ...]

Default: ''

:

'customA customB ...'

Default: ''