Remove all except first item on a html select list (jQuery)
var selectList = $("whatever-selector");
selectList.find("option:gt(0)").remove();
Written by Ion D. Filho
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Jquery
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#