I have a div tag as follows:
<html>
<head></head>
<body>
<div>
<label>Name</label>
<input type="text"/>
</div>
</body>
</html>
Now I want a simple javascript for displaying a tooltip on :hover the div. Can someone please help me out? The tooltip should also have a fade in/out effect.
Tooltips Position pure css
Okay, here's all of your bounty requirements met:
Here's a demo and link to my code (JSFiddle)
Here are the features that I've incorporated into this purely JS, CSS and HTML5 fiddle:
HTML:
CSS:
JavaScript:
You can create custom CSS tooltips using a data attribute, pseudo elements and
content: attr()
eg.http://jsfiddle.net/clintioo/gLeydk0k/11/
.
Without using any API You can do something like this too by using pure CSS and Jquery Demo
HTML
CSS
Jquery
And my version
}
}
}
Then the HTML
you can also use this as tooltip...It works same but you have to write extra tag thats it..