Friday, 13 May 2016

show/hide div on html form focus and blur ::: HEMANT VISHWAKARMA

JAVASCRIPT


<script>
$(function() {
    $(".infobox-profile").hide();

    $(".text").focusin(function() {
        $(".infobox-profile").show(800);
    }).focusout(function () {
       // $(".infobox-profile").hide();
    });
});
</script>

HTML


<form>
<input id="text"></input>
<div class="infobox-profile">hello</div>
</form>

No comments:

Post a Comment