Get Text From Selected using selectize
jquery, selectize.js
Solution
`select_option.getItem(select_option.getValue())[0].innerHTML; select_option = $select_option[0].selectize; ` to get text value of a specified dropdown option.
`this.getItem(value)[0].innerHTML` to get text value of current dropdown option
Problem
I've tried this: ``` var eventHandler = function() { return function() { console.log($select.val()); }; }; var $select = $('.selectize').selectize({ create : true, onChange : eventHandler() }); ``` Which get me the value of the selected option but I need the text. When I do this: ``` console.log($select.val().text()); ``` I get an error. I've tried other things to no avail. How do I get the selected text?