I have a form with an input (#test). Does anyone know how to, when in focus, display another div (#tool-tip) with jQuery?
<form>
<div id="tool-tip"></div>
<input id="test" />
<input type="submit">
</form>
$("#test").focusin(function() {
$("#tool-tip").show();
}).focusout(function () {
$("#tool-tip").hide();
});
Using .focusin() and its opposite, focusout()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With