Ravi
Ravi

Reputation: 8209

triggering onchange event

I'm not able to get the below code to work.

$("#grid_table td:nth-child(10) input").live("onchange",function () {
    alert("changed");
});

am I missing something here? Thanks.

Ravi

Upvotes: 1

Views: 587

Answers (2)

Quintin Robinson
Quintin Robinson

Reputation: 82335

Try changing onchange to change..

$("#grid_table td:nth-child(10) input").live("change",function () {
    alert("changed");
});

If that doesn't work I would verify your selector is working correctly.

Upvotes: 1

Hooray Im Helping
Hooray Im Helping

Reputation: 5264

Have you tried this:

$("#grid_table td:nth-child(10) input").change(function () {
  alert("changed");
});

to make sure your selector is working properly?

Upvotes: 0

Related Questions