Can someone help me why my store not accepting any js or jquery syntax?
Topic summary
A user is experiencing issues with JavaScript and jQuery code not executing properly in their Shopify store. Screenshots show code snippets that aren’t functioning as expected.
Key Problem:
- JavaScript/jQuery syntax appears to be rejected or not working in the store environment
- An alert() function works, but display-related code does not execute
Suggested Solution:
- Another participant recommends console logging the element to check if it returns null
- The issue may be related to code placement timing—the JavaScript might be running before the DOM is fully loaded
- Suggestion to place the code after the document has loaded
Current Status:
- The user confirmed the alert works on the collection page but the display functionality still fails
- The root cause remains unresolved, with the discussion appearing to be ongoing
1 Like
Hi @danica06
Have you tried console logging the element? If it turns out null, it might be the placement of your code. You actually have to place the code after the document loaded.
1 Like



