mathiasbynens/Placeholder-jQuery-Plugin — Issue #41: Submit handler doesn't work for dynamically added forms
Author: syn3rgy
Created: 2011-10-08 15:35:22+00:00
State: open

A quote from this guy\post

I had the same problem with your plugin, and the same fix worked.

"Submit handler that is added to forms to clear placeholder values is bind only to forms existing in HTML. Any dynamically created forms (for example added with AJAX) don't have it.

A quick fix would be to use delegate instead of bind."

So this line:

$('form').bind('submit.placeholder', function() {

would become:

$(document).delegate('form', 'submit.placeholder', function() {