<commit_before>## ng-tooltip

Simple tooltip, only 1.7kb, smallest between the ones I've found for Angular. Also
* no external dependency (except for Angular)
* highly customizeable, you decide: classes/templates/animation/exact placement

Animates if ngAnimate is included, otherwise uses basic hide/remove.

Tested on Chrome/Firefox. Should work on IE(run Angular < 1.3 because 1.3 doesn't support i8) and Safari as well.
http://jedanput.github.io/ng-tooltip/
See [Demo](http://jedanput.github.io/ng-tooltip/ "Demo")  here.

## Installation

Either copy dist/ng-tooltip(.min).js or install through bower:

```bash
bower install ng-tooltip --save
```

Then add dependency to your app, for instance:

```bash
angular.module('myApp', ['tooltip.module'])
```

### Basic Usage

Include 'ngAnimate' if you want animations and add appropiate css, see demo
page for an example. If ngAnimate is not included, it falls back to basic show/hide.

#### HTML

```bash
<selector tp-placement="" tp-class="" tp-timer="" tp-tooltiptext="">Click</selector>
```

#### JS

Anchor is the position of the popup/tooltip, where you will attach it to the
parent element. Orientation of x- and y axis is top to bottom and left to right.

### Options

#### Position

Two inputs, placement relative to tooltip (anchor) and relative to parent.
Both range from 0 to 100% of respective width/height.

tp-x, tp-y
    position relative to parent. Direction is top to bottom and left to right.

tp-anchor-x, tp-anchor-y
    position relative to tooltip. Direction is top to bottom and left to right.

tp-mouseover-delay (default 500)
    Number of milliseconds (ms) before tooltip is shown on hover.

tp-class
    Class(es) for the tooltip.

tp-active-class (default disabled)
    Used for animation before tooltip is removed.

tp-text
    Text to display.

tp-template (default disabled)
    HTML template to display. Takes in plain text.

### Examples

```bash
<button class="item" tp-placement="" tp-class="tooltip" tp-timer="100" tp-tooltip="Hello!">Click</button>
```

```bash
<div class="item" tp-placement="" tp-class="tooltip" tp-timer="100" tp-tooltip="Hello!">Hover to see</div>
```

```bash
<span class="item" tp-placement="" tp-class="tooltip" tp-timer="100" tp-tooltip="Hello!">span</span>
```

```bash
<p class="item" tp-placement="" tp-class="tooltip" tp-timer="100" tp-tooltip="Hello!">paragraph</p>
```

## TODO

* Enable more advanced animations.
* Enable different element to use as parent.
* Multiple Tool tips per element.
* Tests.

## Contributing
See the [CONTRIBUTING Guidelines](https://github.com/jedanput/slush-slush-component/blob/master/CONTRIBUTING.md)

## Support
If you have any problem or suggestion please open an issue [here](https://github.com/jedanput/slush-slush-component/issues).

## License

The MIT License

Copyright (c) 2015, jedanput

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,<commit_msg>changed Readme<commit_after># ng-tooltip

Simple light tooltip, only 1.6kb.
* no external dependency (except for Angular)
* highly customizeable, you decide: classes/templates/animation/exact placement

Animates if ngAnimate is included, otherwise uses basic hide/remove.

Tested on Chrome/Firefox. Should work on IE(run Angular < 1.3 because 1.3 doesn't support i8) and Safari as well.

## Demo
See [Demo](http://jedanput.github.io/ng-tooltip/ "Demo")  here.

## Installation

Either copy dist/ng-tooltip(.min).js or install through bower:

```bash
bower install ng-tooltip --save
```

Then add dependency to your app, for instance:

```bash
angular.module('myApp', ['ngTooltip'])
```
Make sure you include ngAnimate if you want animation and add the appropiate classes. See demo for more information.

## Basic Usage

Anchor is the position of the popup/tooltip, where you will attach it to the
parent element. Orientation of x- and y axis is top to bottom and left to right.

```bash
<selector   tp-tooltip <!-- adds the directive -->
            tp-x=""  <!-- x value of selector, from 0 - 100 -->
            tp-y=""  <!-- y value of selector, from 0 - 100 -->
            tp-anchor-x=""  <!-- x value of tooltip, from 0 - 100 -->
            tp-anchor-y=""  <!-- y value of tooltip, from 0 - 100 -->
            tp-delay=""  <!-- number of milliseconds before showing tooltip -->
            tp-template=""  <!-- input custom template -->
            tp-class=""  <!-- input custom class -->
            tp-text=""  <!-- text to display on tooltip -->
            tp-trigger-on=""  <!-- trigger tooltip on click or hover -->
            tp-animate="">  <!-- set true if you want animation -->
</selector>
```

### Examples

```bash
    <div class="item"
                         tp-tooltip
                         tp-x="0" tp-y="100"
                         tp-anchor-x="0" tp-anchor-y="0"
                         tp-class="tooltip"
                         tp-text="Hello world!"
                         tp-trigger-on="hover">
      Hover over me!
    </div>
```

```bash
    <div class="item"
                         tp-tooltip
                         tp-x="50" tp-y="0"
                         tp-anchor-x="50" tp-anchor-y="100"
                         tp-template="{{template}}"
                         tp-trigger-on="click"
                         tp-animate="true">
      Click!
    </div>
```

## TODO

* Enable more advanced animations.
* Enable different element to use as parent.
* Multiple Tool tips per element.
* Tests.

## Contributing
Feel free to contribute!

## License

The MIT License

Copyright (c) 2015, jedanput

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,
{'fraction_non_alphanumeric': 0.10710835058661146, 'fraction_numerical': 0.009799861973775017, 'mean_word_length': 3.20545560069646, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 30, 'https://': 2, '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': '4239270', 'n_tokens_mistral': 2114, 'n_tokens_neox': 1996, 'n_words': 849}