npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

minitip

v1.6.0

Published

Ultra lightweight jQuery tooltip plugin

Downloads

10

Readme

jQuery miniTip Plugin (v1.6.0)

License

Dual licensed under the MIT and GPL licenses:

  • http://www.opensource.org/licenses/mit-license.php
  • http://www.gnu.org/licenses/gpl.html

Copyright 2011, James Simpson http://goldfirestudios.com

Description

miniTip is an ultra lightweight jQuery plugin that creates highly customizable tooltips without all of the fluff.

Features

  • JS + CSS is just 4.5kb minified (1.7kb gzipped)!
  • No images
  • Automatically stays within viewport
  • Automatic support for image maps
  • Extremely easy to style
  • Use text or HTML from title tag, hidden element, or JS declaration
  • Fade in and out
  • Set custom delay for show/hide
  • Specify default anchor position
  • Persistent tooltip that only closes when mouse moves off of tooltip and anchor element
  • Support for hover and click events
  • Optional title bar
  • Tested in: IE7+, Firefox 3.5+, Safari 3+, Chrome, Opera 10+
  • More features can be found at the miniTip home page

Installation

You can either download it from the dist directory, or install it via NPM

npm i --save minitip

Documentation

Please go to the miniTip home page to view the full documentation (it is really straightforward, I promise!).

Examples

This is the most basic usage. It displays a miniTip on mouseover of the element with ID "tip" and content of the title tag (maximum width of 250px). Mouseout of the "tip" hides the miniTip.

$('#tip').miniTip();

This is a more advanced example utilizing all available options (as of v1.0). The element with ID of "tip" will be activated by click instead of mouseover. It will have a title bar with text "Title Bar" and content defined in the JS call. It will wait .5s before showing and hiding the tooltip, and the fade animation will be .5s both ways. The default anchor position is east (the right side of the anchor element). Auto-hide is set to false, so the tooltip will only hide once your mouse is off of the tooltip and the anchor element. The max width is set to 50px and the offset is 15px, so the tooltip's stem will be 15px from the edge of the anchor element. Finally, an event will fire when the tooltip is shown (alerting "Hello,"), and another will be fired when it is hidden (alerting "World!").

$('#tip').miniTip({
	title: 'Title Bar',
	content: 'This is a test miniTip!',
	delay: 500,
	anchor: 'e',
	event: 'click',
	fadeIn: 500,
	fadeOut: 500,
	aHide: false,
	maxW: '50px',
	offset: 15,
	stemOff: 0,
	show: function(){ alert('Hello,'); },
	hide: funciton(){ alert('World!'); },
	class: "custom-class"
});

You can also pass options per element using the element's attributes:


	<div data-minitip-class='my-custom-class' data-minitip-maxW='500'>hover me</div>

More examples and live demos can be found at http://goldfirestudios.com/blog/81/miniTip-jQuery-Plugin

Requirements

  • jQuery v1.3+