How to hide div class using JavaScript while textbox is filled?
I want to hide class loadData while textbox(t1) is filled.
Example code:
<input type="text" name="t1" placeholder="search">
<div class="loadData">
// some content here....
</div>
window.onload = function () {
elements = document.getElementsByName("t1");
var divs = document.getElementsByClassName("loadData");
elements.onblur = function() { divs.style.visibility="hidden"; };
};
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