When working with jQuery 1.6.1 and the jQuery Form Example Plugin I found that the examples were being serialized the plan was to use Ajax to send the serialized data back to the server and save it but I didn’t want to have to try and remove the examples server side. So triggering unload on the examples will allow serialize to get the correct data. Example JavaScript below.

var examples = $(‘.example’);
_.each(examples,function(elm){
$(elm).unload();
});

I used Userscore.js to give me a quick foreach style loop and called the unload event on every element that has the class .example which is the default class that jQuery Form Example plugin uses.

Comments