Revision: 15165
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at June 26, 2009 14:06 by wjbrown
Initial Code
// for each select field on the page
$("select").each( function(){
// set its value to its first option
$(this).val( $("#" + $(this).attr("id") + " option:first").val() );
});
Initial URL
Initial Description
Couldn't find a better way to do this, nor could I find it on teh interwebs, so here it is.
Initial Title
jQuery reset all select fields
Initial Tags
jquery
Initial Language
jQuery