Hover through the links below to see the effect
Demos
A simple tip show title
A simple tip with custom desc
A ajax weibo card
User Guide
- 1.Four directions(top,bottom,left,right)
- 2.Three ways(Normal,ajax,jsonp)
- 3.Auto cache ajax data, no-need to resend the request again
- 4.Custom css you can change the style.css
// Vtip.js 1.3
// (c) 2012 Viking.
// For all details and documentation:
// https://github.com/vikingmute/vtooltip
//parameters goes here
var settings = {
//four postions,top left,right bottom
position:'bottom',
//three ways:normal or ajax or jsonp
method:'normal',
//when method is ajax or jsonp, you need a url
url:'',
//when you need a custom message
desc:'',
//custom width&height
width:'auto',
height:'auto',
}
//usage
//simple will show the title
$('a').vtip();
//simple with a custom content
$('a').vtip({"desc":"Hey i am a custom tip"});
//ajax method with callbacks
$('#ajax').vtip({method:"ajax",url:"posts.php"},function(data,ele){
//data refers the ajax data,ele refres the tip element
//code goes here
})