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

tipso

v1.0.8

Published

A Lightweight Responsive jQuery Tooltip Plugin

Downloads

810

Readme

tipso

A Lightweight Responsive jQuery Tooltip Plugin

Build Status NPM version Bower version Gittip

There is also a Wordpress version of this plugin. Get it here

Getting started

  1. Include jQuery

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

    Requires jQuery 1.7+

  2. Include plugin's code

    <link rel="stylesheet" href="/path/to/tipso.css">
    <script src="/path/to/tipso.js"></script>

To use css3 animation effects please include Animate.css

```html
<link rel="stylesheet" href="/path/to/animate.css">	
```
  1. Call the plugin

    $('.tipso').tipso();

##Usage

| Name | Default | Description | |---------------------|--------------|------------------------------------------------------------------------------------------------------------------------------------| | speed | 400 | integer - Duration of the fade effect in ms | | size | '' | Tipso Bubble size classes (string: 'tiny', 'small', 'default', 'large') or you can make your own classes | | background | '#55b555' | Background color of the tooltip, it can be hex, rgb, rgba, color name | | titleBackground | '#333333' | Background color of the tooltip title, it can be hex, rgb, rgba, color name | | color | '#ffffff' | Text color of the tooltip, it can be hex, rgb, rgba, color name | | titleColor | '#ffffff' | Text color of the tooltip title, it can be hex, rgb, rgba, color name | | titleContent | '' | The content of the tooltip title, can be text, html or whatever you want | | showArrow | true | Ability to show/hide the arrow of the tooltip (true, false) | | position | 'top' | Initial position of the tooltip, available positions 'top', 'bottom', 'left', 'right' | | width | 200 | Width of the tooltip in px or % (for % add the value in quotes ex.'50%') | | maxWidth | '' | max-width of the tooltip in px or % (for % add the value in quotes ex.'50%'). For usage you need to set width to '', false or null | | delay | 200 | Delay before showing the tooltip in ms | | hideDelay | 0 | Delay before hiding the tooltip in ms | | animationIn | '' | CSS3 animation effect to show the tooltip using Animate.css | | animationOut | '' | CSS3 animation effect to hide the tooltip using Animate.css | | offsetX | 0 | Offset value of the tooltip on X axis | | offsetY | 0 | Offset value of the tooltip on Y axis | | tooltipHover | false | Abillity to interact with the tooltip content | | content | null | The content of the tooltip, can be text, html or whatever you want | | ajaxContentUrl | null | Url for Ajax content | | ajaxContentBuffer | 0 | Buffer timer for Ajax content | | contentElementId | null | Normally used for picking template scripts | | useTitle | false | To use the default title attribute as content (true, false) | | templateEngineFunc | null | A function that compiles and renders the content | | onBeforeShow | function(){} | Function to be executed before tipso is shown | | onShow | function(){} | Function to be executed after tipso is shown | | onHide | function(){} | Function to be executed after tipso is hidden |

Additionaly you can use data-tipso instead of the title attribute for the tooltip content ( set useTitle: false )

You can set all the options via data-tipso attribute. For example if you want to change the background you will add data-tipso-background="#555555" to the element.

API

	// Show the tipso tooltip
	$('.tipso').tipso('show');

	// Hide the tipso tooltip
	$('.tipso').tipso('hide');

	// Hide/Close the tipso tooltip from inside the tooltip and/or without hideDelay timeout
	$('.tipso').tipso('close');
	// or as alternative
	$('.tipso').tipso('hide', true);

	// Destroy tipso tooltip
	$('.tipso').tipso('destroy');
	
	// Add a callback before tipso is shown
	$('.tipso').tipso({
		onBeforeShow: function ($element, element) {
			// Your code
		}
	});

	// Add a callback when tipso is shown
	$('.tipso').tipso({
		onShow: function ($element, element) {
			// Your code
		}
	});

	// Add a callback when tipso is hidden
	$('.tipso').tipso({
		onHide: function ($element, element) {
			// Your code
		}
	});

	// Load AJAX content to tipso
	$('.tipso').tipso({	
		useTitle: false,
		ajaxContentUrl : 'ajax.html'
	});

	// Update tipso options
	$('.tipso').tipso('update', 'content', 'new content');

Demo

Here is the link to the demo

Bugs

For bug reports, questions, feature requests, or other suggestions please create an issue on GitHub.

Author

| ![twitter/BojanPetkovski](http://gravatar.com/avatar/30befed2bed6e1690a6b47cf617f7927?s=105](http://twitter.com/BojanPetkovski "Follow @BojanPetkovski on Twitter") | |---| | Bojan Petkovski |

Contributors

auxiliary

License

tipso is licensed under the MIT License