Socket
Socket
Sign inDemoInstall

@momsfriendlydevco/angular-bs-tooltip

Package Overview
Dependencies
4
Maintainers
5
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @momsfriendlydevco/angular-bs-tooltip

AngularJS + Bootstrap tooltip support


Version published
Weekly downloads
13
increased by1200%
Maintainers
5
Install size
6.91 MB
Created
Weekly downloads
 

Readme

Source

angular-bs-tooltip

AngularJS + Bootstrap tooltip support.

DEMO

Installation

  1. Grab the NPM
npm install --save @momsfriendlydevco/angular-bs-tooltip
  1. Install the required script + CSS somewhere in your build chain or include it in a HTML header:
<script src="/libs/angular-bs-tooltip/dist/angular-bs-tooltip.min.js"/>
  1. Include the router in your main angular.module() call:
var app = angular.module('app', ['angular-bs-tooltip'])
  1. Use somewhere in your template:
<a class="btn btn-primary" tooltip="Hello World!">Top</a>

A demo is also available. To use this follow the instructions in the demo directory.

API

Options

The following options can be applied to any element to configure tooltips.

OptionTypeDefaultDescription
tooltipstring""The content to display in the tooltip. This is rendered dynamically so Angular braces can be used. If tooltip-html is true the contents are rendered as HTML
tooltip-positionstringtopWhere to position the tooltip. Values are: top, bottom, left, right
tooltip-containerstringbodyThe element to attach the tooltip to. Values are: body, element
tooltip-triggerstringhoverWhen to display the tooltip. Values are: hover, focus, click, manual
tooltip-htmlbooleanfalseWhether to render the contents as HTML. If false, plain text is used
tooltip-showbooleanfalseForce the tooltip to show or hide (this overrides tooltip-trigger if true or false, set to undefined to ignore)
tooltip-tetherboolean OR numberfalseUse Tether to dynamically pin the element. Use this (and include Tether in the project) if your underlying element changes position frequently. This setting is the time interval Tether should check for repositions (a value of true = 100). NOTE: If you are just refreshing positions periodically use the $scope.$broadcast('bs.tooltip.reposition') instead

Events

This directive also responds to the following broadcast events from the scope. To use these simply broadcast from the parent scope downwards using $broadcast(). For example $scope.$broadcast('bs.tooltip.reposition') will force all tooltips below the calling controller to reposition themselves.

EventDescription
bs.tooltip.repositionReposition all tooltips to their parent element if they are visible. If tooltip-tether is enabled on any tooltip it will be used for positioning, if not the tooltip is repositioned by Bootstrap

Keywords

FAQs

Last updated on 07 Oct 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc