im trying trigger('blur'); in the input collection, but it doesn't seem to be that way.
available here http://jsfiddle.net/VUUme/1/
im getting the collection and i got the blur method but i'm not sure about the trigger part.
var $inputs = $('#form').find('input'); alert('load'); $inputs.each(function(){ $(this).trigger('blur'); }); //i tried this to but with no success //$inputs.trigger('blur'); alert('after the blur'); $inputs.blur(function(){ var $this = $(this); if ($this.val() == ''){ alert('it works'); } });
Dejan.S
source share