Button not getting disabled?


	var post=$('.status-box').val();

 $('.status-box').keyup(function() {
    var Length=$(this).val().length;
    var charLeft=140-Length;
    else if(charLeft<0){


<textarea rows="4" cols="67" placeholder="Whats's on your mind ?" class="status-box"></textarea>
<a class="btn" href="#">Post</a><a class="btn1" id="counter">140</a>

<div class="container">
<ul class="posts">



Hi @manojselvin,

After the $('.status-box').keyup(...); part, you need a line that adds the disabled class to .btn, so that the button gets disabled before you do anything :slight_smile:


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.