Timeline for How To Implement JavaScript Snippet in Magento .PHTML file so that it works?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 16, 2017 at 8:55 | comment | added | Iveta Allogenes | I have found that using jQuery instead of $ makes the difference between working and not working for JS scripts in Magento 2. If you don't use RequireJS that is.. | |
Sep 6, 2017 at 7:05 | comment | added | Obscuro | Did you tried to replace "JQuery" with $ ? | |
Sep 5, 2017 at 15:17 | comment | added | Iveta Allogenes | Yes, I did clear css/js cache, flushed cache. Still no success. I placed the code in copyright.phtml, so that it will load at the footer. I also removed the 'jqueryui' from the require statements, as I don't need it in this case, correct? And I was getting error message for it in the console, not being found. When I view page source, I can see that the script shows up at the bottom of the page = no old cache issue, correct? | |
Sep 5, 2017 at 14:55 | comment | added | Ben Crook | @IvetaAllogenes this should work, did you clear all caches? | |
Sep 5, 2017 at 12:33 | comment | added | Iveta Allogenes | Wrapping the code snippet in the suggested format does not work either. | |
Sep 5, 2017 at 12:05 | history | answered | Obscuro | CC BY-SA 3.0 |