Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6054605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:10:18+00:00 2026-05-23T08:10:18+00:00

When using jquery .change on an input the event will only be fired when

  • 0

When using jquery .change on an input the event will only be fired when the input loses focus

In my case, I need to make a call to the service (check if value is valid) as soon as the input value is changed. How could I accomplish this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:10:19+00:00Added an answer on May 23, 2026 at 8:10 am

    UPDATED for clarification and example

    examples: http://jsfiddle.net/pxfunc/5kpeJ/

    Method 1. input event

    In modern browsers use the input event. This event will fire when the user is typing into a text field, pasting, undoing, basically anytime the value changed from one value to another.

    In jQuery do that like this

    $('#someInput').bind('input', function() { 
        $(this).val() // get the current value of the input field.
    });
    

    starting with jQuery 1.7, replace bind with on:

    $('#someInput').on('input', function() { 
        $(this).val() // get the current value of the input field.
    });
    

    Method 2. keyup event

    For older browsers use the keyup event (this will fire once a key on the keyboard has been released, this event can give a sort of false positive because when “w” is released the input value is changed and the keyup event fires, but also when the “shift” key is released the keyup event fires but no change has been made to the input.). Also this method doesn’t fire if the user right-clicks and pastes from the context menu:

    $('#someInput').keyup(function() {
        $(this).val() // get the current value of the input field.
    });
    

    Method 3. Timer (setInterval or setTimeout)

    To get around the limitations of keyup you can set a timer to periodically check the value of the input to determine a change in value. You can use setInterval or setTimeout to do this timer check. See the marked answer on this SO question: jQuery textbox change event or see the fiddle for a working example using focus and blur events to start and stop the timer for a specific input field

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to change an element's ID using jQuery. Apparently these don't work: jQuery(this).prev(li).attr(id)=newid
I want to use .animate to change colors when .bind('click') is fired, using jquery
I'm using a form and jQuery to make a quick change on a web
I am using a jquery change event using a slider to present to a
I'm using jQuery to change the HTML of a tag, and the new HTML
As you can see on http://jsbin.com/erivi/ I'm using Jquery to change some image (and
Using JQuery it possible to clone a Div like this and change add a
How can I change a checkbox for a radio button using jQuery?
How can you change the href attribute (link target) for a hyperlink using jQuery?
How can I change CSS from javascript . I'm using jQuery-ui Dialog and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.