miguelgrinberg / turbo-flask

Integration of Hotwire's Turbo library with Flask.
MIT License
301 stars 35 forks source link

select2 Uncaught TypeError: $select.select2 is not a function #10

Closed jaylcm closed 3 years ago

jaylcm commented 3 years ago

hi, after i insert {{ turbo() }} on head, my filter does not work.

Uncaught TypeError: $select.select2 is not a function at addFilter (VM3174 bs4_filters.js:136) at HTMLAnchorElement. (VM3174 bs4_filters.js:154) at HTMLAnchorElement.dispatch (VM3159 jquery.min.js:2) at HTMLAnchorElement.y.handle (VM3159 jquery.min.js:2) addFilter @ bs4_filters.js?v=1.0.0:136 (anonymous) @ bs4_filters.js?v=1.0.0:154 dispatch @ jquery.min.js?v=2.1.4:2 y.handle @ jquery.min.js?v=2.1.4:2

could you please show me the correct way to do it?

Thanks CM

jaylcm commented 3 years ago

hi,

i have found the solution where i place all my js on head tag

Thanks