Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Magento as far as I know have it already loaded but jQuery functions won't work in my module.
What can I do with it ? How can I make sure I have an access to it ?
I would like to avoid jQuery conflicts.
If I would like to use jQuery in my module and if jQuery is not added with this module I says jQuery missing so I'm asking how can I use jQuery which should be already loaded with basic template/layout or not ?
this code will check if jQuery is available or not. if (typeof jQuery === 'undefined') {console.log("jQuery is NOT available");} else {console.log("jQuery is available");}
if (typeof jQuery === 'undefined') {console.log("jQuery is NOT available");} else {console.log("jQuery is available");}