ready = -> $('.selectize').selectize(); $(document).ready(ready) $(document).on('page:load', ready)