I have this code:
$('#cornercases').val('10')
$('#cornercases').trigger('change',function ()
{
alert("HELLO WORLD");
$('input[name="temp_2"]').val('555');
});
I set a value of 10 to create 10 textboxes on the fly. After the change, I like to update the values in the created textbox. How come the code within the function isn’t work?
How can I get it to work?
You’re probably trying to
bindan event handler, nottriggerthe event.triggerdoesn’t actually take a function at all.