Jump to content

JQuery Events (Please help me.. )


VAKURU

Recommended Posts

$(function() {
    
    $("#demo").keyup(function(){
        var len = $("#demo").val();
        
        if(len.length>8){
            
            var el = $("<p></p>").html("");
            $("#holder").append(el);
            
            //$("p").addClass("alert alert-warning");
            var x = $("<span></span>").html(" Too long");
        
            $("p").append(x);
            $("span").addClass("glyphicon glyphicon-alert");
            
            stop();
        }
        else if(len.length<=8){
            $("#holder p").children().remove();
        }
    });
    
});

form validation.JPG

Edited by VAKURU
Missing Naration
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...