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 🙏

© 2026 – Pkg Stats / Ryan Hefner

ztooltip

v1.0.1

Published

A simple tooltip made by pure javascript,working on most browsers includes IE6.

Readme

#ZTooltip

A simple tooltip made by pure javascript,working on most browsers includes IE6.It's very befitting to be used in a simple single page.The tooltip will adjusts it's position to make sure that is in the viewport.

无任何依赖,兼容绝大部分浏览器包括IE6,很适合简单的活动页使用。tooltip显示时会自动调整出现位置以保证自身始终处于浏览器视口范围内。

##Introduction

Demo

Screenshot

image

image

image

##Install

$ npm install ztooltip

##Usage

###HTML

<link rel="stylesheet" href="ZTooltip.min.css">
<!-- ... -->
<a data-tooltip="show" data-content="This is a button!">Hover</a>
<a data-tooltip="show" data-trigger="click" data-content="You catch me!">Click</a>
<!-- ... -->
<script src="ZTooltip.min.js"></script>

###JS

ZTooltip({
	width: 200,        // Optional tooltip width, default 200px
	height: 100,       // Optional tooltip height, default auto
	boxOffsetX: 70,    // Optional tooltip offsetX, default 20px
	boxOffsetY: 7,     // Optional tooltip offsetY, default 5px
	arrowSize: 10,     // Optional size of tooltip's arrow, default 10px
	trigger: 'click'   // Optional trigger method, default hover
});

Work with module bundler

var ZTooltip = require('ZTooltip');
ZTooltip({...});

Attribute

You need add data-tooltip="show" to the element which you want to trigger tooltip.The Attribute data-content=xxx provides words in the tooltip.You can also set data-trigger="click/hover" to add another way to trigger tooltip of the element.

你需要给触发tooltip的元素添加 data-tooltip="show" 属性, data-content="xxx" 里添加tooltip里显示的文字。可以通过 data-trigger="click/hover" 为元素添加另外的触发方式。

LICENSE

MIT © zhiyul