As stated in the jQuery API Documentation, the triggerHandler() method does not work on events bound to objects using the live() method, which includes also objects created after the DOM was loaded completely.

However, this is nothing unusual. In fact, it might be a common way to work within an advanced AJAX enabled webapplication. I encountered this problem this evening and also created a simple workaround. The following code snippet works just fine.

var event = new $.Event('click');
event.preventDefault();
$('input:submit', $(this)).trigger(event);
blog comments powered by Disqus
Blog Logo

Toni Uebernickel

Software Engineer and Architect, Symfony and Propel evangelist with some Ducati bikes.

Image

havvg's playground

Developing Software is Fun!

View the index page.