Dear All,

I'm struglling with one small prblm with my code.

// Charecter count
$(document).ready(function (){
    $('#msgbx').click(function(){
    var charLength = $(this).val().length;
    $('#charcount').html(charLength + ' of 250 characters used');
    // Alerts when 250 characters is reached
    if($(this).val().length > 250){
        $('#charcount').html('<strong>You may only have up to 250 characters.</strong>');
    });
});

Please help me. Thanks in advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.