jsp - how to set selected option in jquery multiselect -


i use jquery multiselect. want set option selected when write selected="selected" attribute option multiselect doesn't run correctly. example when 2 option selected deselect option after number of selected doesnt decrease. use control 6: callback in this demo.

my javascript:

$(document).ready( function() {   $("#identificationmethods").multiselect( null, function(el) {     ...   }); }); 

my html

<select id="identificationmethods" name="identificationmethods[]" multiple="multiple" style="width: 100px;">   <c:foreach items="${identificationmethodics}" var="im">     <option <c:if test="${im.selected == true}">selected="selected"</c:if> value="${im.subtype}">       ${im.subtype}     </option>   </c:foreach> </select> 


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -