I have a span tag that's over an input field. What I'm trying to do is when you click on the input field the span with text in it gets hidden. then on Blur it's shown. This all works using jquery. The problem is because the span is on top of the input field the input focus doesn't get triggered when you click on the span text. Is there a way to get around this and not have the span stop the input filed focus from working.
You could set the focus on the input if the span is clicked.
$('#span').click(function() {
$('#input').focus();
});
$('#input').focus(function() {
$('#span').hide();
});
$('#input').blur(function() {
$('#span').show();
});
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