Giter Club home page Giter Club logo

tooltip-directive's Introduction

N17 Tooltip

Angular Directive

Show a tooltip to give the user some information, can be shown or hidden either on a mouse event, or programmatically.

Installation

Bower

bower install --save n17tooltip

GitHub

https://github.com/n17solutions/tooltip-directive.git

The usable files are housed in the dist folder

Compatibility

N17 Tooltip requires:

  • AngularJS
  • jQuery
  • qTip2

If you are already using these frameworks in your project, you should use the files from the no-frameworks folder. We have also included a full bundle in the inc-frameworks folder.

If using the inc-frameworks source, you will need to bootstrap an AngularJS App around all N17 Tooltips on the page. For Example:

<div ng-app="n17-tooltip">
	<n17-tooltip-speechbubble>
		...

If using AngularJS in your app already, you will need to add N17 Tooltip as a dependency of your app. For Example:

var app = angular.module('myapp', ['n17-tooltip']);

Usage

<n17-tooltip-speechbubble
	tooltip="Tooltip Content"
	tooltip-title="Tooltip Title">
		Tooltip Element
</n17-tooltip-speechbubble>

This will result in a speechbubble tooltip resembling

![Speechbubble tooltip screenshot] (http://i.imgur.com/zTRPS2H.png)

Options

There are many options available and they can be accessed using the Angular Directive attribute notation. For Example:

<n17-tooltip-speechbubble
	tooltip="Tooltip Content"
	tooltip-title="Tooltip Title"
	tooltip-close-button="true">
		Tooltip Element
</n17-tooltip-speechbubble>

This will show a close button within the tooltip to enable the dismissal of the popout, as shown in the previous screenshot.

List of Options

  • tooltip-my: String; The tooltip positioning (default: 'center left') (See: [QTip2 Positioning Guide] (https://github.com/qTip2/qTip2/wiki/Position))
  • tooltip-at: String; The tooltip positioning (default: 'right center') (See: [QTip2 Positioning Guide] (https://github.com/qTip2/qTip2/wiki/Position))
  • tooltip-class: String; The CSS class to assign to the element (default: 'tooltip')
  • tooltip-content: String; The content to show within the tooltip
  • tooltip: String; Alias for tooltip-content
  • tooltip-close-button: Boolean; show a close button (default: false)
  • tooltip-allow-hide: Boolean; allow the tooltip to auto hide (default: true)
  • tooltip-show-effect: Enum; one of the effect values (see below)
  • tooltip-hide-effect: Enum; one of the effect values (see below)
  • tooltip-hide-delay: Boolean; Whether to have a delay before the tooltip hides
  • tooltip-adjust-x: Int; adjusts the position of the tooltip along the x axis by the amount of pixels specified
  • tooltip-adjust-y: Int; adjusts the position of the tooltip along the y axis by the amount of pixels specified
  • expression: Angular Expression; expression to use as the tooltip value

Effects

N17 Tooltip supports animations and effects when showing and hiding the tooltip, the supported effects are:

  • Slide - slides down on show and up on hide

tooltip-directive's People

Contributors

wooderz avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.