Skip to content

Commit

Permalink
jquery: Add the js class, remove the no-js one
Browse files Browse the repository at this point in the history
This used to be done by Modernizr until its removal in
08f27c1. Some sites apply different styling for
JS-disabled environments; one such example is the jQuery UI Download Builder
which expands all Themeroller knobs sections in the no-JS mode.
  • Loading branch information
mgol committed Apr 19, 2024
1 parent b12072b commit c9c7144
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions themes/jquery/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
* All sites
*/
$(function() {
// Some CSS depends on the `js` class.
$( "html" ).addClass( "js" ).removeClass( "no-js" );

// copyable auto-select-all
$( ".copyable" ).on( "click", function() {
if ( typeof this.select === "function" ) {
Expand Down

0 comments on commit c9c7144

Please sign in to comment.