How to dynamically filter a select2 listing based on option class
问题 I have a dropdown select of optional 'opportunities' ( id="opportunities" in the example below) which I enhance using the select2 jquery plugin, and wish to dynamically filter this list in order to reduce the possible options presented to a user using a 2nd select dropdown ( id="group-select" in the example below), <label> Select an opportunity<br> <select id="opportunities" style="width:300px;" multiple="multiple" name="selected-opps" value=""> <optgroup label="Class A"> <option class="group