• Stars
    star
    1,255
  • Rank 36,486 (Top 0.8 %)
  • Language
    JavaScript
  • Created over 14 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Opentip is an open source javascript tooltip based on the protoype framework.

Opentip

Opentip is a free opensource Java-Script tooltip class.

Features

It supports:

  • Stems (little pointers)
  • Automatic content download with AJAX
  • Different styles
  • Automatic repositioning of the tooltip if it's not in the viewport of the browser anymore
  • All kind of triggers (The tooltip can be triggered by mouse over, click, form submit,... everything you can think of really)
  • CSS3 Animations
  • Well tested, with over 200 unit tests

As of Version 2.0 Opentip does no longer depend on Prototype. You can choose any adapter you want so you can work with the framework of your choice.

Supported frameworks are:

If you want to contribute, please read on in the contribute file. If you are migrating from version 1.x please refer to the migration section

Build status

Master Build Status

Develop Build Status

Installation

jQuery, Prototype, Native

Just download lib/opentip.js and lib/adapter.FRAMEWORK.js and include them in this order. You can also take the already minified and combined files in the downloads/ folder.

Component

The easiest and recommended way to install opentip is with component. Just add enyo/opentip as dependency in your component.json and rebuild it.

Simply requiring opentip then activates the tooltips: require "opentip";

Ender

If you prefer ender as package manager just install it like this:

$ ender build opentip

Bower

Another package manager supported is bower:

$ bower install opentip

You should include opentip's CSS as well. It's in css/opentip.css. (Except for component of course which automatically bundles the css.)


If you want to work it with <=IE8, you have to include excanvas as well. Please refer to the installation guide.

Usage

Version 2.4.6

With HTML data attributes:

<div data-ot="Tooltip content" data-ot-show-on="click">Click me</div>

or with the Javascript API:

$('elementId').opentip('Content', { showOn: "click", ...options... });

For the complete documentation please visit www.opentip.org.

Future plans

  • Become library independant. I'm currently working on extracting all prototype functionality, so I can switch library easily. The next library I'll support will be jquery, and then mootools.

  • Add more skins.

  • Add cooler loading animation.

  • Implement unit tests.

If you have ideas, please contact me!

Contribute

Please refer to the CONTRIBUTING readme.

Migrating from Opentip 1.x to 2.x

Those are the major changes you should look out for when migrating from 1.x to 2.x:

  • There's no Tip or Tips object anymore. Everything is done through Opentip

  • The recommend way to create opentips now is to call new Opentip(element, content, title, options), or with the framework of your choice (eg, ender: $("#my-div").opentip(content, title options))

  • The instantiation of new tips inside an event (eg: onclick, onmouseover) is no longer supported! This would create new opentips everytime the event is fired.

  • Opentip.debugging = true; does no longer exist. Use Opentip.debug = true;

  • Positions are no longer of the weird form [ "left", "top" ] but simply strings like "top left" or "right"

  • stem.size has been dropped in favor of stem.length and stem.base

  • Most of the design is now done in JS since the whole thing is a canvas now.

  • The way close buttons are defined has completely changed. Please refer to the docs for more information.

Tagging

Tagging in this project is done with my tag script.

Authors

Opentip is written by Matias Meno.
Original graphics by Tjandra Mayerhold.

Contributors

Thanks to the following people for providing bug reports, feature requests and fixes:

  • Torsten Saam
  • Aaron Peckham
  • Oguri
  • MaxKirillov
  • Nick Daugherty

If I forgot somebody, please just tell me.

Related projects

You might also be interested in my formwatcher or dropzone.

License

(The MIT License)

Copyright (c) 2012 Matias Meno <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

stateless-html-example

This is an example repository for a colorglare.com article
JavaScript
62
star
2

mongo-rest

Mongoose REST interface.
CoffeeScript
53
star
3

node-tvdb

A node library for thetvdb.com
CoffeeScript
26
star
4

rincewind

A PHP Library, including Database classes, Daos, a static Storage class, etc...
PHP
11
star
5

iris

A complete abstraction of client <-> server communication
Dart
11
star
6

www.yesmeno.com

CSS
10
star
7

use-vest

TypeScript
10
star
8

md5

MD5 algorithm written by Paul Johnston
JavaScript
9
star
9

stripe-dart

Dart
9
star
10

formwatcher

JS framework for forms
CoffeeScript
8
star
11

foundation-stylus

Stylus port of Zurb's foundation
CoffeeScript
6
star
12

tag

Upgrades the version number and tags it.
CoffeeScript
5
star
13

enyo.github.io

User page
JavaScript
4
star
14

data-proxy

A data proxy to communicate with backends.
CoffeeScript
4
star
15

vocal-coach

TypeScript
3
star
16

nominatim

OpenStreetMap Nominatim API
Dart
3
star
17

functionbind

A function.bind() IE polyfill
JavaScript
2
star
18

old-brainslug

MC
C++
2
star
19

nibble

CSS framework based on nib
JavaScript
2
star
20

excanvas

Excanvas (modified so it works in IE8)
JavaScript
2
star
21

brainslug-server

2
star
22

copypastor

Another source code sharer
JavaScript
2
star
23

domready

A domready component.
1
star
24

snaptest

PHP5 Unit Testing Framework
PHP
1
star
25

css3grid

JavaScript
1
star
26

image-shrink

Connect middleware that resizes images on the fly and caches them
CoffeeScript
1
star
27

lindas-page

HTML
1
star
28

iris-example

Example project for remote services
Dart
1
star
29

opentip-website

The website for opentip, the free open-source javascript tooltip.
PHP
1
star
30

formwatcher-website

Formwatcher website
1
star
31

settings

My settings
1
star
32

socketlabs

An API client for the SocketLabs email service.
Dart
1
star
33

lokker

Secure digital wallet.
Dart
1
star
34

rodin

Object modeling library for mongodb based on mongo_dart.
Dart
1
star
35

jumpstarter

Starts up an app with clusters.
CoffeeScript
1
star
36

postman

A poster written in node.
JavaScript
1
star
37

twinkle

Proof of concept
1
star
38

melodle

Melodle - Guess the melody
TypeScript
1
star
39

gp-newsletter

Newsletter
Java
1
star
40

advent-of-code

My hacked together solutions
Dart
1
star
41

markdown-ast

1
star