Download
User Rating: 3.4/5 ( 1 votes)
jQuery Form Toolltip allows you to add Tooltip calllout (with fadeIn fadeOut animation) to your form input controls.
Source: github.com
1. INCLUDE JS FILES
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="../src/jquery.formtooltip.js"></script>
2. HTML
<form id="formname">
<table>
<tr>
<td>
Title
</td>
<td>
<input type="text" value="blank" name="title"/>
</td>
</tr>
<tr>
<td>
Name
</td>
<td>
<input type="name" value="Blank Name" name="name"/>
</td>
</tr>
<tr>
<td>
Color
</td>
<td>
<input type="color" value="#000FFF" name="color"/>
</td>
</tr>
<tr>
<td>
TextArea
</td>
<td>
<textarea type="month" value="" name="text"></textarea>
</td>
</tr>
</table>
</form>
3. JAVASCRIPT
Construct the fields in JSON format:
-
You are able to specify the individual tooltip CSS
-
You are able to fadeIn and fadeOut direction. Currently supporting Top, Bottom, Right and Left
run $().formtooltip() function to your form using the constructed JSON.
$(document).ready(function(){
var fields = {
title: {
tooltip : "This field is actually for bla bla bla...</br>and bla bla bla",
position: 'bottom'
},
name : {
tooltip: "This is for fun!!!!",
position: 'right',
backgroundColor: "#FF0000",
color: '#FFFF00'
},
color : {
tooltip: "This is for your cover color~~~ <a href='#'>here</a>"
},
text : {
tooltip: "Please provide your comment here."
}
};
//Include Global Color
$("#formname").formtoolip(fields, { backgroundColor: "#000000" , color : "#FFFFFF", fontSize : 15, padding : 10, borderRadius : 5});
});