<commit_before>h1. RaccoonTip

A lightweight jQuery based balloon tip library

h2. Introduction

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

h2. Installation

h3. When including jQuery yourself

Just include RaccoonTip after you have included jQuery:

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

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

h3. When letting RaccoonTip include jQuery automatically

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

<pre>
  |-raccoon_tip.js
  |~jquery
    `-core.js
</pre>

Just include RaccoonTip:

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

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

h2. Usage

The RaccoonTip module provides you the following three functions:

* @display@ - The @core@ function for displaying the RaccoonTip
* @register@ - Instruct RaccoonTip to call @RaccoonTip.display@ when a certain event is triggered on certain elements (at default the @click@ event)
* @close@ - This function closes the RaccoonTip of course

h3. Display

As already mentioned, this is the core function for displaying RaccoonTip. This function accepts the following arguments:

* @target@ - The element which RaccoonTip points to
* @content@ - The content which will be displayed within RaccoonTip: this can be either @null@ (for dynamic content), HTML, DOM elements or text
* @options@ - A simple hash which customizes RaccoonTip

h4. Available options

* @duration@ (default: @"fast"@)<br>
  This influences the speed with which RaccoonTip will be displayed (see also "http://api.jquery.com/show":http://api.jquery.com/show)
* @position@ (default: @"bottom_right"@)<br>
  The default position with which RaccoonTip will attempt to display itself (it searches for an alternative when being displayed outside the window viewport)
* @beforeShow@ (default: @"function() {}@)<br>
  A callback function called before showing RaccoonTip (handy for altering RaccoonTip's content dynamically)
* @canHide@ (default: @function() { return true; }@)<br>
  A function which will only close RaccoonTip when the function returns a @true@ value
* @afterHide@ (default: @function() {}@)<br>
  A callback function called after hiding RaccoonTip

h4. A simple example

<pre>
  <script>
    RaccoonTip.display("#page_menu a.login", "#login_menu", {duration: "slow"});
  </script>
</pre>

h3. Register

You can use @RaccoonTip.register@ to instruct RaccoonTip to display itself when a certain event on certain elements are triggered. It accepts the same arguments as @RaccoonTip.display@.

h4. Available options

The options available are the options listed in *Display* along with:

* @event@ (default: @"click"@) – The event that triggers the call to @RaccoonTip.display()@

h4. A simple example

<pre>
  <script>
    RaccoonTip.register(
      "a.tip", null,
      {
        event: "hover",
        beforeShow: function(content, options) {
          $(this).html(randomText());
        }<commit_msg>Updated README.textile<commit_after>h1. RaccoonTip

A lightweight jQuery based balloon tip library

h2. Introduction

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

h2. Installation

h3. When including jQuery yourself

Just include RaccoonTip after you have included jQuery:

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

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

h3. When letting RaccoonTip include jQuery automatically

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

<pre>
  |-raccoon_tip.js
  |~jquery
    `-core.js
</pre>

Just include RaccoonTip:

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

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

h2. Usage

The RaccoonTip module provides you the following three functions:

* @display@ - The @core@ function for displaying the RaccoonTip
* @register@ - Instruct RaccoonTip to call @RaccoonTip.display@ when a certain event is triggered on certain elements (at default the @click@ event)
* @close@ - This function closes the RaccoonTip of course

h3. Display

As already mentioned, this is the core function for displaying RaccoonTip. This function accepts the following arguments:

* @target@ - The element which RaccoonTip points to
* @content@ - The content which will be displayed within RaccoonTip: this can be either @null@ (for dynamic content), HTML, DOM elements or text
* @options@ - A simple hash which customizes RaccoonTip

h4. Available options

* @duration@ - *default*: @"fast"@<br>
  This influences the speed with which RaccoonTip will be displayed (see also "http://api.jquery.com/show":http://api.jquery.com/show)
* @position@ - *default*: @"bottom_right"@<br>
  The default position with which RaccoonTip will attempt to display itself (it searches for an alternative when displayed outside the window viewport)
* @beforeShow@ - *default*: @function() {}@<br>
  A callback function called before showing RaccoonTip (handy for altering RaccoonTip's content dynamically)
* @canHide@ - *default*: @function() { return true; }@<br>
  A function which will only close RaccoonTip when the function returns a @true@ value
* @afterHide@ - *default*: @function() {}@<br>
  A callback function called after hiding RaccoonTip

h4. A simple example

<pre>
  <script>
    RaccoonTip.display("#page_menu a.login", "#login_menu", {duration: "slow"});
  </script>
</pre>

h3. Register

You can use @RaccoonTip.register@ to instruct RaccoonTip to display itself when a certain event on certain elements are triggered. It accepts the same arguments as @RaccoonTip.display@.

h4. Available options

The options available are the options listed in *Display* along with:

* @event@ - *default*: @"click"@
  The event that triggers the call to @RaccoonTip.display()@

h4. A simple example

<pre>
  <script>
    RaccoonTip.register(
      "a.tip", null,
      {
        event: "hover",
        beforeShow: function(content, options) {
          $(this).html(randomText());
        }
{'fraction_non_alphanumeric': 0.1020140105078809, 'fraction_numerical': 0.0049620548744892, 'mean_word_length': 4.4088397790055245, 'pattern_counts': {'":': 4, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '566351', 'n_tokens_mistral': 2087, 'n_tokens_neox': 2025, 'n_words': 815}