Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6736421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:07:40+00:00 2026-05-26T11:07:40+00:00

I included Modernizr on my site: <script type=text/javascript src=<?php bloginfo(‘template_directory’); ?>/js/modernizr.custom.js></script> and I have

  • 0

I included Modernizr on my site:

<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/modernizr.custom.js"></script>

and I have this in custom.js:

if (Modernizr.mq("screen and (max-width:480)")) {
alert("hello");
}

I resized my browser to be 480px, refreshed the site, but I didn’t see any alert.

Any suggestions to fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:07:40+00:00Added an answer on May 26, 2026 at 11:07 am

    You need the unit value px in your media query:

    Your line:

    if (Modernizr.mq("screen and (max-width:480)")) {\
    

    Should be:

    if (Modernizr.mq("screen and (max-width:480px)")) {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Included Scripts <script src=../../Scripts/jquery-ui-1.8.17.custom.min.js type=text/javascript></script> Accordion Script ` $(function () { $(#accordion).accordion(); }); $(#tabs).tabs();
I included mootools le this <script language=javascript src='<%# ResolveClientUrl(~/Scripts/mootools-core-1.3.1-full-compat.js)%>' type=text/javascript/> It compiles but when
I included yepnope.js and then the following: <script type=text/javascript> /*<![CDATA[*/ yepnope([{ load: 'http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js', complete:
I have included Django comments framework in my project, and added custom templates to
I have included custom code into csproj file which Zip the whole project on
I included css file as follows, but does not work. <link rel=stylesheet type=text/css href=/_control/navi.css
I included some jQuery script on my site. The script doesn't work with anything
My included file (include.php) is this: <?php $myarray=(a,b,c); shuffle($myarray); ?> My main php file
PyEnchant included in site-packages.zip in bundle, but it cant load any dict! Why not?
I have an app included into INSTALLED_APPS that needs to be monkey-patched. The problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.