javascript - modernizr no-js class does not work -
let first experience here on stackoverflow , first question. went old skool html html5, after research learned modernizr.
i made head :
<!doctype html> <!--[if ie 6]> <html class="no-js" id="ie ie6" <?php language_attributes(); ?>> <![endif]--> <!--[if ie 7]> <html class="no-js" id="ie ie7" <?php language_attributes(); ?>> <![endif]--> <!--[if ie 8]> <html class="no-js"id="ie ie8" <?php language_attributes(); ?>> <![endif]--> <!--[if !(ie 6) | !(ie 7) | !(ie 8) ]><!--> <html class="no-js" <?php language_attributes(); ?>> <!--<![endif]--> <head> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/> <script src="<?php bloginfo('template_directory'); ?>/js/modernizr.custom.65696.js"></script> <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script> <script src="http://code.jquery.com/jquery-2.1.0.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/tweenmax.min.js"></script> </head>
after checking source in browser see no-js class not changed js. clicked on js link in source , code of modernizr, there no broken link.
can tell me did wrong.
thanks in advance.
i replied question on @ wordpress forums, here same answer
modernizr client side javascript, , runs after source code loaded browser. doesn't modify source, modifies dom
if open developer tools in browser, see html classes removed.
hope helps!
Comments
Post a Comment