You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionpre_select_options(select_element,pre_select_options){// // v2: awesome, but not working. multi-select error?// $(`${TC_SELECT_ELEMENT} option`).prop("selected", function () {// return ~$.inArray(this.text, pre_select_options) ? 'selected' : false;// });$(`${TC_SELECT_ELEMENT} option`).prop("selected",function(){return~$.inArray(this.text,pre_select_options) ? 'selected' : false;});}window.onload=function(){pre_select_options($(TC_SELECT_ELEMENT)[0],window.location.hash.slice(1).split(','));//example-init-code}
and, even though the element on devtools says $0.selected = true, it is not shown on the second list. Only rendering the page with selected="selected" works.
I might be missing the obvious (as I have very limited js experience), but kindly help.
The text was updated successfully, but these errors were encountered:
I am using the example code http://loudev.com/#Searchable almost verbatim.
I have:
and, even though the element on devtools says
$0.selected = true
, it is not shown on the second list. Only rendering the page withselected="selected"
works.I might be missing the obvious (as I have very limited js experience), but kindly help.
The text was updated successfully, but these errors were encountered: