Wednesday 1 October 2014

jquery show hide

jquery show hide

jquery show hide Demo

<input type="text" id="textbox"/>

<p>Error </p>
<button type="button" id="button">Click Me!</button>


$('#button').click(function() {
    var value = $('#textbox').val().length;
   
    if(value >=1)
    {
    alert(value);
         $("p").hide();
    }
    else{
    $("p").show();
       
    }
   

});








No comments:

Post a Comment