If you write
$('#id2').live('change',function() {
then you do it because #id2 has not been created yet. trigger('change') , on the other hand, immediately triggers an event. But if the element does not exist yet, calling it has no effect.
You need to call trigger() after creating the element:
$('#id2').trigger('change');
There is no need to use live() if #id2 already exists. You can just use bind() .
source share