---
title: "Keyup event not fired in JQuery"  
description: "Keyup event not fired in JQuery"  
author: "Anonymous User"  
published: 2013-01-29  
updated: 2013-01-29  
canonical: https://www.mindstick.com/forum/555/keyup-event-not-fired-in-jquery  
category: "jquery"  
tags: ["jquery"]  
reading_time: 2 minutes  

---

# Keyup event not fired in JQuery

Hi! Everyone!

Keyup [event](https://www.mindstick.com/articles/167719/marquee-hire-benefits-of-event-lighting-hire-london) is not [fire](https://yourviews.mindstick.com/view/81364/assam-oil-well-fire-accident-why-we-are-prone-to-it) properly:\
I am working with the Keyup [method](https://www.mindstick.com/forum/166/webservice-method) of jQuery and it doesn't seem to work for me. below is my [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) and please find out the [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) and reslove.

## My code is below

```
 <script src="http://code.jquery.com/jquery-1.8.3.js"></script>    <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>    <script>      $('#TAcomments').keyup(function() {        var textCount = $(this).val().length;        if(textCount <= 10) {          $('#TAcomments').stop().animate({ fontSize : '22px' });        }        if(textCount > 10) {          $('#TAcomments').stop().animate({ fontSize : '16px' });        }        if(textCount > 20) {          $('#TAcomments').stop().animate({ fontSize : '14px' });        }        if(textCount > 30) {          $('#TAcomments').stop().animate({ fontSize : '10px' });        }      });    </script>
```

**[HTML](https://www.mindstick.com/articles/1530/design-a-simple-stylish-calculator-using-html-css-and-javascript) code**

```
 <textarea id="TAcomments" style="width: 400px; height: 300px; font-size: 22px;"></textarea>
```

Can you help me?

Thanks in [advance](https://www.mindstick.com/blog/33258/jee-mains-and-jee-advance-exams)

## Replies

### Reply by AVADHESH PATEL

Hi John Rob!

You just overwrite your jquery code with below code

```
$(document).ready(function(){
    $('#TAcomments').keyup(function() {
        var textCount = $(this).val().length;
        if(textCount <= 10) {
            $('#TAcomments').stop().animate({ fontSize : '22px' });
        }
        if(textCount > 10) {
           $('#TAcomments').stop().animate({ fontSize : '16px' });              
        }
        if(textCount > 20) {
           $('#TAcomments').stop().animate({ fontSize : '14px' });  
        }
        if(textCount > 30) {
           $('#TAcomments').stop().animate({ fontSize : '10px' });  
        }
    });
});
```


---

Original Source: https://www.mindstick.com/forum/555/keyup-event-not-fired-in-jquery

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
