14,954
edits
| Line 21: | Line 21: | ||
* HTML<ref>[http://www.w3schools.com/tags/att_option_selected.asp HTML option selected Attribute]</ref> | * HTML<ref>[http://www.w3schools.com/tags/att_option_selected.asp HTML option selected Attribute]</ref> | ||
* jQuery: [http://api.jquery.com/prop/ .prop()]<ref>[http://stackoverflow.com/questions/1280369/jquery-set-selected-option-using-next select - jQuery Set Selected Option Using Next - Stack Overflow]</ref> | * jQuery: [http://api.jquery.com/prop/ .prop()]<ref>[http://stackoverflow.com/questions/1280369/jquery-set-selected-option-using-next select - jQuery Set Selected Option Using Next - Stack Overflow]</ref> | ||
* jQuery .attr() ex: <nowiki>$("#myDropDown option:text=" + myText +"").attr("selected", "selected"); </nowiki><ref>[http://stackoverflow.com/questions/496052/jquery-setting-the-selected-value-of-a-select-control-via-its-text-description javascript - jQuery - setting the selected value of a select control via its text description - Stack Overflow]</ref> | * jQuery [http://api.jquery.com/attr/ .attr()] ex: <nowiki>$("#myDropDown option:text=" + myText +"").attr("selected", "selected"); </nowiki><ref>[http://stackoverflow.com/questions/496052/jquery-setting-the-selected-value-of-a-select-control-via-its-text-description javascript - jQuery - setting the selected value of a select control via its text description - Stack Overflow]</ref> | ||
== Display or hide the element by id == | == Display or hide the element by id == | ||