Reputation: 210
I keep getting this error over again while using select.js for some reason I have checked other similar error it is still the same although I am doing this in flask jinja template and also have version 3.6.0 0f jquery installed and also got the selectize.js from the standalone folder I also tried the selectize.min.js is there any other JS needed? here is the error:
error: Uncaught TypeError: $(...).selectize is not a function Tried code:
$(function() {
$('select').selectize({
sortField: "text"
});
});
also:
$(document).ready(function(){
$('select').selectize({
sortField: "text"
}
});
});
I even tried to rearrange my libraries, still same error. HTML:
<select class="" name="">
<option value="">sd</option>
<option value="">sd</option>
<option value="">sd</option>
<option value="">sd</option>
</select>
Please any advise on this or am missing something?
Upvotes: 0
Views: 474
Reputation: 210
So this finally worked for me:
$(document).ready(function($){
$('select').selectize();
});
Upvotes: 0