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

mtip

v0.0.1

Published

A flexible, simple,cross browser and extensible Javascript plugin for javascript custom tooltips.

Downloads

1

Readme

mtip

A flexible, simple,cross browser and extensible Javascript plugin for javascript custom tooltips by Manish Kumar under MIT license.

Compatible with

Mozilla Firefox

Google Chrome,

IE8+

Opera

No Jquery required. Fully Customizable with available options

Getting Strated

Download & Include mTip.js

After you Download mTip include mTip.js files in your html.

      <head>
             <script type="text/javascript" src="mTip/mTip.js"></script>
      </head>

Note: You don't need any jQuery for mTip to work. It built on pure javascript and supports most of the browsers out there as listed above.

Set up Your Markup

To have the elements to show mTip tooltips set the data-mtip=* attribute to whatever text you want to be shown in the tooltip.

     //Apply tooltip to a span element
     <span data-mtip="This is a span">This is a span</span>

     //Apply tooltip to a div
     <div data-mtip="This is a div">This is a div</div>

     /Apply tooltip to a image
     <img src="img.jpg" data-mtip="This is a Image">This is a Image</div>

Activate mTip Tooltip

The last thing to be done is to activate mTip. In order to activate do this add below code in your head tag.

      //If you are using jQuery
      <script>
      $(document).ready(function(){
              mTip();
       });
       </script>

       //If you are not using jQuery
       <script>
             window.onload=function(){
             mTip();
             }
        </script>

        //If you want to use mTip in angular projects keep the below code in your controller
        <script>
             $scope.$on('$viewContentLoaded', function () {
                     //Here your view content is fully loaded !!
                      mTip();
              });
         </script>

And there you go nothing else needed. You are successfuly done away with using the default html tooltips and in place of that you will now see tooltips of your choice which you can even configure according to your choice. Read more in Options on how to customize the mTip tooltips.

Options

mTip gives you a range of options which you can use to customize your tooltips to your satisfaction. Here is how you can use these options.

                <script>
                    $(document).ready(function(){
                        mTip({
                            color:"white",
                            backgroundColor:"rgb(158, 226, 235)",
                            position:"bottom"
                        });
                    });
                </script>

Below is the list of currently available options. More to come soon.

Option | Accepted Values | Description -------------------- | ----------------------------------- |-------------------------------------- backgroundColor | ny valid html color in hexadecimal/rgb(0,0,0)/nameOfColor | Sets the background color of the mTip tooltip color | Any valid html color in hexadecimal/rgb(0,0,0)/nameOfColor| Sets the forecolor/textcolor of the mTip tooltip text delay | Any valid integer | Delays the appearence of the tooltip for the number of miliseconds passed as the value of the delay parameter. opacity | Any valid integer between 0 - 1 | Sets the opacity of the tooltip i.e gives transparency to the tooltip with 0 being transparent and 1 being opaque. Also using this can affect the transparency of contents of the tooltip position | bottom, left, right, top | This parameter is used to position the mTip tooltip. Based on the value of the option the tooltip position is either bottom, left, right or top. selector | Any valid CSS Selector | This parameter is used to initialize tooltip only on those elements which are identified by the selector as passed in the options for example:- use '.className' for selecting elemets having class as 'className'. trigger | click, hover | This parameter is used to tell mTip when to show the tooltip i.e based on the value passes the tooltip is shown either on click of the element or mouse hover.

FAQ's

1.What is mTip?

  • A cross browser javascript custom tooltip plugin. A simple, flexible, extensible and customizable plugin.

2.Need help with implementing mTip?

  • Please go through the Getting Started Section. Still if you face any issue feel free to contact.

3.Do we need jQuery for mTip to work?

  • No mTip is a pure javascript plugin. You don't need jQuery for mTip to work.

4.Which all browsers do mTip support?

  • mTip supports all modern browsers. IE8+, Edge, Chrome, Firefox, Opera.

5.I found a bug/issue with mTip?

6.How can i customize mTip tooltips?

  • There is a range of options available that helps to customize mTip tooltips. Please visit Options section to know more about available options the help customize mTip tooltips.

7.How compatible is mTip tooltip with Internet Explorer?

  • mTip supports IE 8 and later versions. It works decently with IE8+. But there might be some things which may come up. You can report if you come across one, we will address your query and try to fix if a issue is reported.

More Features Coming Soon.