Tuesday, December 1, 2009

[jQuery] Re: super easy jquery question

> > // reset select
> > $('#form_id select').each(function(){
> > $(this).find('option:first').attr('selected', 'selected').parent('select');
> > });

Yuck, what a waste of energy

document.getElementById("form_id").selectedIndex = 0;

would do the same exact thing

No comments: