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

  • SEARCH
  • Home
  • 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

I have included jquery and jqueryui from google api as follows <script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js></script>
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:
My javascript gets included multiple times with the script tag, like so: <script src=code.js></script>
I have an included javascript file thats initializes an empty array object called widgets
I have the included grails script that I found in some random place on
I have always included clauses to transfer to my clients full author, ownership and
I have included <zlib.h> in my iphone application and the source code I was
I have included a resource in my Visual Studio 2005 solution that was a
I included a text file as output in a WCF set up project. The

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.