jQuery Change Event

Beginner
6 min read
Updated: Oct 2026
5 examples
Live preview

What Is the change Event?

The change event fires when an input, select, or textarea value changes. Bind with .on("change", handler) (since jQuery 1.7). Selects / checkboxes / radios fire immediately; text fields fire after the value changed and the field loses focus.

Remember
$(".target").on("change", function () {
  // value committed / selection changed
});

$(".target").trigger("change");   // fire in code

// .val() does NOT fire change — trigger after script updates
$("#country").val("US").trigger("change");

// Legacy shorthand: .change() — prefer .on / .trigger
NeedUse
Value changed.on("change", handler)
Fire in code.trigger("change")
After .val().val(x).trigger("change")
Left field (any leave).on("blur", …)
Legacy API.change()

How to Use change

Bind on controls whose committed value should drive UI or logic.

  1. Select input, select, or textarea elements.
  2. Call .on("change", handler) — optional eventData before the handler.
  3. In the handler, read $(this).val() (or selected option text).
  4. Remember timing: select/checkbox = immediate; text = on blur if value changed.
  5. After .val(), call .trigger("change") if handlers must run.
PieceRequired?Role
ElementYesinput, select, or textarea
"change"YesEvent type string
handlerYes (to bind)Runs when the value is committed
eventDataOptionalPassed as event.data
.trigger("change")OptionalRun handlers from code

Pseudocode

Pseudocode
element.on("change", handler)

when user changes value:
    if select / checkbox / radio:
        fire change immediately
    if text / textarea:
        fire change on blur only if value differs

when script sets .val(newValue):
    change does NOT fire
    call element.trigger("change") if handlers must run

// Bubbles — parent .on("change", "select", fn) works for delegation

Cheat Sheet

Keep these facts handy while wiring form UX.

TopicDetail
Bind.on("change" [, data], handler) (1.7+)
Trigger.trigger("change") (1.0+)
TimingSelect/checkbox: immediate · text: on blur if changed
vs blurValue changed vs any focus leave
.val()Silent — chain .trigger("change")
Bubbles?Yes (IE normalized since jQuery 1.4)
Shorthand.change() deprecated since 3.3
Official docsapi.jquery.com/change

Live Preview

Change the select or edit the text and leave the field — same idea as the official jQuery API demos. Compare silent .val() vs trigger.

Demo select bound with .on("change") — also try editing the text field and tabbing away.

Log
Ready — pick an action or change a control.

jQuery Examples

Short, copy-ready snippets. Open DevTools, or use Try It Yourself for a live editor.

Example 1 — Bind a Change Handler

Log when a text field or select value changes (official idea).

jQuery
$(".target").on("change", function () {
  $("#out").text(
    "change on #" + this.id + " → " + $(this).val()
  );
});
Try It Yourself

How It Works

  1. Select. $(".target") matches the text input and select.
  2. Bind. .on("change", …) registers one handler for both.
  3. Select. Picking a new option fires change immediately.
  4. Text. Edit, then leave the field — change fires only if the value differs.

Example 2 — Trigger Change from a Button

Official pattern: another control can fire the same handlers.

jQuery
$(".target").on("change", function () {
  $("#out").text("change handler ran on #" + this.id);
});

$("#other").on("click", function () {
  $(".target").trigger("change");
});
Try It Yourself

How It Works

  1. Same handlers. Bound once on every .target.
  2. Natural change. User edits still fire them.
  3. Button. Click calls .trigger("change") on all matches.
  4. Reuse. One path for both user and programmatic change.

Example 3 — Select Label + Init Trigger

Official demo idea: show selected option text, then fire once on load.

jQuery
$("#flavor")
  .on("change", function () {
    var text = $("#flavor option:selected").text();
    $("#out").text("You picked: " + text);
  })
  .trigger("change");
Try It Yourself

How It Works

  1. Bind. The handler reads the selected option’s text.
  2. Init. .trigger("change") runs it once for the default.
  3. Pick. Changing the select updates the label immediately.
  4. Pattern. Common for summaries that must match the UI on load.

Example 4 — .val() Does Not Fire Change

Script updates stay silent until you trigger explicitly.

jQuery
$("#tier").on("change", function () {
  $("#out").text("Tier is now: " + $(this).val());
});

$("#set-silent").on("click", function () {
  $("#tier").val("pro");
  $("#out").text("Silent .val — handler did not run.");
});

$("#set-trigger").on("click", function () {
  $("#tier").val("enterprise").trigger("change");
});
Try It Yourself

How It Works

  1. Bind. The handler waits for a real change event.
  2. Silent. .val() updates the control without firing change.
  3. Trigger. Chain .trigger("change") when UI logic must run.
  4. Remember. This is the most common change-event pitfall.

Example 5 — Pass eventData

Attach extra data when binding; read it as event.data.

jQuery
$("#plan").on("change", { currency: "USD" }, function (event) {
  $("#out").text(
    "Plan: " + $(this).val() + " | " + event.data.currency
  );
});
Try It Yourself

How It Works

  1. Data. The object before the handler becomes event.data.
  2. Change. Picking a new plan runs the handler.
  3. Value. $(this).val() is the new option value.
  4. Label. event.data.currency is shared metadata.

Edge Cases & Pitfalls

Watch for these when using change in real forms.

.val()

.val() does not fire change

Script updates stay silent. Chain .trigger("change") when handlers must run.

timing

Text waits for blur

Selects and checkboxes fire immediately; text fields fire on blur only if the value changed.

blur

blur ≠ change

Leaving a field without editing fires blur, not change.

legacy

.change() is deprecated

Since jQuery 3.3, prefer .on("change") and .trigger("change") over the shorthand method.

Browser Support

The change event is a standard form event. jQuery’s .on("change") API has been available since 1.7; .trigger("change") since 1.0. Bubbling in IE was normalized since jQuery 1.4.

✓ Stable · Form event

change event

Supported in all modern browsers. Prefer jQuery 3.x so .on("change") / .trigger("change") and consistent bubbling are available.

100% Event support
Google Chrome All versions · Desktop & Mobile
Full support
Mozilla Firefox All versions · Desktop & Mobile
Full support
Apple Safari All versions · macOS & iOS
Full support
Microsoft Edge All versions · Chromium & Legacy
Full support
Internet Explorer IE 6+ · Legacy environments
Full support
Opera All modern versions
Full support
change Universal

Bottom line: Safe for production forms. Use .on("change") for value commits; trigger after .val() when script updates must notify handlers.

Performance Notes

ApproachCostBest for
$el.on("change", fn)CheapKnown static fields
$form.on("change", "select", fn)CheapDynamic / many controls
Heavy work in every changeCan stutterKeep handlers light; debounce network

Change handlers run only when a value is committed (or you trigger). Keep them short — update a label or toggle UI — and avoid network calls on every change unless you debounce.

Key Takeaways

  • Role: react when a form value is committed.
  • Modern API: .on("change") / .trigger("change") — not .change().
  • .val() trap: script updates need an explicit trigger.
  • Timing: select immediate; text on blur if changed.

One line: change means “this control’s value just committed” — bind with .on("change").

Frequently Asked Questions

The change event fires when an input, select, or textarea value changes. Bind with .on("change", handler) (since 1.7). Selects, checkboxes, and radios fire immediately; text fields fire when the value changed and the field loses focus.
blur fires whenever focus leaves — even if the value did not change. change fires only when the committed value is different. Tab out without editing → blur yes, change no. Edit and leave → both can fire.
No. Setting a value with .val("new") does not fire change. After a script update, call .trigger("change") if handlers must run: $("#country").val("US").trigger("change").
Call $(".target").trigger("change"). Available since jQuery 1.0. Useful after AJAX fills a select or when syncing dependent dropdowns.
Yes. In modern browsers change bubbles, and jQuery normalized IE since 1.4. You can delegate: $("#form").on("change", "select", fn) for current and future selects.
change is the event name used with .on("change") / .trigger("change"). .change() is the deprecated shorthand method — prefer .on / .trigger in new code (deprecated since jQuery 3.3).

Next: .change() Method

Read the deprecated shorthand and how to migrate it.

.change() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful