Best Tooltip plugin of jQuery -qTip

There are many jQuery Tooltip plugin around and it’s hard to figure it out good one. But after trying out most of them, I found qTip Tooltip very easy.
Here is simple example of qTip (Demo).

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Tooltip Demo - Ashish's Blog</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.qtip-1.0.0.min.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $(".tooltip").qtip({
            content: ' <b>Ashish</b>.<br/> <b>Patel</b>.',
            position: { corner: { target: 'topMiddle', tooltip: 'bottomMiddle'} },
            style: { name: 'light', tip: 'bottomMiddle', border: { width: 2, radius: 1 }, width: 100 },
            show: { when: { event: 'mouseover'} },
            hide: { when: { event: 'mouseout'} }
        });
    });
</script>
<script type="text/javascript">
    $(document).ready(function () {
        $(".txttooltip").qtip({
            content: ' <b>Enter Name</b>.',
            position: { corner: { target: 'rightMiddle', tooltip: 'leftMiddle'} },
            style: { name: 'dark', tip: 'leftMiddle', border: { width: 2, radius: 1 } },
            show: { when: { event: 'focus'} },
            hide: { when: { event: 'unfocus'} }
        });
    });
</script>
</head>
<body>
I'm <a class="tooltip" href="#">Ashish Patel</a>. 
Name: <input class="txttooltip" type="text" name="firstname" />
</body>
</html>

qTip plugin have many more features than I cove in my post. Have look into qTip developer site and download Qtip from there.

Thanks.

2 responses to “Best Tooltip plugin of jQuery -qTip”

  1. I don’t suppose you have an example of using this qtip on an image, do you? I’m trying to use it, but can’t seem to figure it out.

Leave a Reply