Focus & Blur
Posted: Thu Jul 08, 2010 3:34 pm
Hi,
I'm working on a simple tooltip using jQuery. I am able to get it working with one text field, but not for all.
This is my jQuery.
HTML
I want to addon in a way that, it is able to know which textfield I'm at and to display the hint accordingly.
Thank you.
I'm working on a simple tooltip using jQuery. I am able to get it working with one text field, but not for all.
This is my jQuery.
Code: Select all
$(document).ready(function() {
$("#fullname").focus(function() {
$("span.hint").show();
});
$("#fullname").blur(function() {
$("span.hint").hide();
});
});Code: Select all
<input type="text" name="fullname" id="fullname" maxlength="50" value="" /><span class="hint">This is the name your mama called you when you were little.<span class="hint-pointer"> </span></span> </div>Thank you.