Skip to content
A lightweight jQuery based balloon tip library
JavaScript Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
releases
src
test
.gitignore
CHANGELOG
MIT-LICENSE
README.textile
Rakefile
VERSION

README.textile

RaccoonTip

A lightweight jQuery based balloon tip library

Introduction

RaccoonTip is a small Javascript library which lets you display HTML, DOM elements or text in a balloon tip with great ease. It uses jQuery (http://jquery.com) to keep your HTML as clean as possible. RaccoonTip is tested in IE6+, Firefox 3+, Safari 3+ and Chrome5+. RaccoonTip does NOT require images and is rendered with CSS3.

Installation

When including jQuery yourself

Just include RaccoonTip after you have included jQuery:

  <script src="path/to/jquery.js" type="text/javascript"></script>
  <script src="path/to/raccoon_tip.js" type="text/javascript"></script>

Note: include raccoon_tip-min.js for the minified RaccoonTip library

When letting RaccoonTip include jQuery automatically

Make sure you put the jquery directory in the same directory as the RaccoonTip library:

  |
  |-- raccoon_tip.js
  |
  |-- jquery
    |
    |-- core.js

Just include RaccoonTip:

  <script src="path/to/raccoon_tip.js" type="text/javascript"></script>

Note: include raccoon_tip-min.js for the minified RaccoonTip library

Usage

The RaccoonTip module provides you the following three functions:

  • display – The core function for displaying the RaccoonTip
  • register – Calling this function tells RaccoonTip to display itself when a certain event is triggered (at default the click event)
  • close – This function closes the RaccoonTip of course

Display

Lorem ipsum dolor sit amet…

  <script type="text/javascript">
    RaccoonTip.display("#page_menu a.login", "#login_menu");
  </script>

Available options

  • duration -
  • position -
  • beforeShow -
  • afterHide -

Register

Lorem ipsum dolor sit amet…

  <script type="text/javascript">
    RaccoonTip.register("#page_content a", "#login_menu");
  </script>

Close

You can close the RaccoonTip just by clicking outside it. But you can also close it by calling the close function:

  ...
  <a href="#" onclick="RaccoonTip.close(); return false">Close</a>
  ...

It’s easy as 1-2-3!

For a complete example, please open http://github.com/archan937/raccoon_tip/blob/master/test/index.html.

Contact me

For support, remarks and requests please mail me at paul.engel@holder.nl.

Credit

This Javascript library depends on:

jQuery
http://jquery.com

ToDo’s

  • Complete README.textile
  • Tweak the positioning in IE6

License

Copyright © 2010 Paul Engel, released under the MIT license

http://holder.nlhttp://codehero.eshttp://gettopup.comhttp://twitter.com/archan937paul.engel@holder.nl

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.

Something went wrong with that request. Please try again.