Qtip hide and show option is available which can be mentioned as a option.
HTML:
<fieldset>
<legend>Validating a complete form</legend>
<p>
<label for="firstname">Firstname</label>
<input type="text" class="show-tip" message="This is Firstname Field" name="firstname" id="firstname">
</p>
<p>
<label for="password">Password</label>
<input type="password" name="password" id="password">
</p>
<p>
<label for="email">Email</label>
<input type="email" name="email" id="email">
</p>
<p>
<label for="agree">Please agree to our policy</label>
<input type="checkbox" name="agree" id="agree" class="checkbox">
</p>
<p>
<label for="newsletter">I'd like to receive the newsletter</label>
<input type="radio" name="gender" id="male" class="radio">
</p>
<p>
<input type="submit" value="Submit" class="submit">
</p>
</fieldset>
Code:
$(document).ready(function () {
var tipOptions = {
content: 'Some basic content for the tooltip',
show: 'focus',
hide: {
when: {
event: 'unfocus'
}
}
};
$('input[type=text]').qtip(tipOptions);
$('input[type=password]').qtip(tipOptions);
$('input[type=email]').qtip(tipOptions);
$('input[type=checkbox]').qtip(tipOptions);
$('input[type=radio]').qtip(tipOptions);
$('input[type=checkbox]').mouseover(function(){
$('input[type=checkbox]').qtip('show');
});
$('input[type=checkbox]').mouseout(function(){
$('input[type=checkbox]').qtip('hide');
});
$('input[type=radio]').mouseover(function(){
$('input[type=radio]').qtip('show');
});
$('input[type=radio]').mouseout(function(){
$('input[type=radio]').qtip('hide');
});
});
Demo shared in JS Fiddle Reference
Updated - 23rd Dec 2016
Working Example with qTip2
in Single line.
var tipOptions = {
content: 'Some basic content for the tooltip',
show: 'focus',
hide: {
when: {
event: 'unfocus'
}
}
};
$('input').qtip(tipOptions);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/qtip2/3.0.3/basic/jquery.qtip.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/qtip2/3.0.3/basic/jquery.qtip.css" />
<fieldset>
<legend>Validating a complete form</legend>
<p>
<label for="firstname">Firstname</label>
<input type="text" class="show-tip" message="This is Firstname Field" name="firstname" id="firstname">
</p>
<p>
<label for="password">Password</label>
<input type="password" name="password" id="password">
</p>
<p>
<label for="email">Email</label>
<input type="email" name="email" id="email">
</p>
<p>
<label for="agree">Please agree to our policy</label>
<input type="checkbox" name="agree" id="agree" class="checkbox">
</p>
<p>
<label for="newsletter">I'd like to receive the newsletter</label>
<input type="radio" name="gender" id="male" class="radio">
</p>
<p>
<input type="submit" value="Submit" class="submit">
</p>
</fieldset>