$(document) .ready(function() { checkElements(); }); function checkElements() { // add elements $('.timepicker') .timepicker({ timeInput: true }); $('.datetimepicker') .datetimepicker(); if($('.ckeditor').length > 0) { /* // original CKEDITOR.replaceAll( 'ckeditor', { //extraPlugins: 'abbr' } ); */ // custom from StackOverflow: https://stackoverflow.com/questions/30214555/ckeditor-4-replaceall-with-custom-config CKEDITOR.replaceAll(function(textarea,config) { if(textarea.className == "ckeditor") { $(textarea).removeClass('ckeditor'); return true; } else { return false; } }); } $('.user-select') .combobox({ create: function (evt, ui) { console.log(ui); } }); $('.user-select').combobox('value', null); }