Hi, I've seen the "no-js" class used a lot in Shopify supported themes but i can't work out what it's purpose is. I've pasted an example header section from the Supply theme below where i don't understand the usage of "no-js" I've highlighted "no-js" in blue below. Shopify Partner. This is an accepted solution.
Click Like to let me know! Mark it as an Accepted Solution! Thanks for your reply. Thanks Olly. Sergiu Svinarciuc CTO visely. Important Links. Latest Topics. Turning off auto scroll to top of page Dawn 2.
How to change featured collection to act as a slider. Mainly for mobile. Google Ads Disapproved due to cart. How to remove these divider lines on my website? How to remove the feature on shopify -.
In the end, deviating from that practice just raises more questions. Show 12 more comments. From Modernizrs' Anotated Source no longer maintained : Remove "no-js" class from element, if it exists: docElement. Zach Lysobey Zach Lysobey The Modernizr version using a RegExp is safer and likely faster though. AndrewF - could you maybe expand on that a bit? How exactly is it safer? SLaks SLaks k gold badges silver badges bronze badges. You said "The no-js class gets removed by a javascript script".
So how Javascript works Able to remove 'no-js' class if it 's disabled. Could you give me a clear? You're right and this is actually the point: If JavaScript is disabled, the class will stay and you can for example show some html part using CSS to warn the user about it. Be aware, JS errors may occur after Modernizr has done this so its not a foolproof way of testing JS is functioning — htmlr. Fizer Khan Fizer Khan And the use of that, is styling differently if JavaScript not running in the browser.
Alireza Alireza The Overflow Blog. Does ES6 make JavaScript frameworks obsolete? Podcast Do polyglots have an edge when it comes to mastering programming Featured on Meta. Now live: A fully responsive profile. Linked See more linked questions.
Related Hot Network Questions. Question feed. Table of Contents. Save Article. Improve Article. Like Article. Last Updated : 22 Apr, Syntax: Hey geek! The constant emerging technologies in the world of web development always keeps the excitement for this subject through the roof.
But before you tackle the big projects, we suggest you start by learning the basics. Now at it's lowest price ever! Previous What is shadow root and how to use it? Next How to Combine multiple elements and append the result into a div using JavaScript?
Recommended Articles.
0コメント