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 6058997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:39:42+00:00 2026-05-23T08:39:42+00:00

I am using css media queries on my project to create a site that

  • 0

I am using css media queries on my project to create a site that will work with any sized screen. I am looking to trigger difference jquery functions just like I would with css.

For example, If the browser size is between 1000px and 1300px, I would like to call the following function:

$('#mycarousel').jcarousel({
    vertical: true,
    scroll: 1,
    auto: 2,
    wrap: 'circular'
});

BUT when the browser size is below 1000px, the js would stop its processing. So on and so forth.

I’m not sure if this is possible, but perhaps there is an existing solution or plugin that creates different js environments based on browser window sizes. I suppose I could create conditional statements in some format. Any thoughts?

  • 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-23T08:39:43+00:00Added an answer on May 23, 2026 at 8:39 am

    The Modernizr library supports making direct JavaScript calls that evaluate media queries.

    If you don’t want to do that, you could have your different CSS rules drive some property of a hidden element, and you could then use “.css()” to check the value from jQuery. In other words, the rule for “bigger than 1000px wide” could set a hidden <div> to “width: 1000px”, and you could then check

    if ( $("#widthIndicator").css("width") === "1000px") {
      // whatever
    

    Here is a dumb jsfiddle demonstrating. Drag the middle separator bar left and right to see that the JavaScript code (in the interval timer) detects the change to effective “width” of the hidden element.

    If you refer to a responsive design then you could also trigger an existing element’s property without adding markup to your html,for example

    if ( $("#navigation li").css("float") === "none") {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I create rounded corners using CSS?
Should we think about CSS media other than screen and print? http://www.w3.org/TR/CSS2/media.html#media-types all Suitable
Is there a way to create paginated content (display separated pages horizontally/vertically) using CSS
I am using a separate print css on our website. It's been requested that
I'm writing a website using media queries to handle the mobile version. Would it
I have a bunch of CSS written that makes my site target Mobile first,
I am aware that using CSS sprites is the way to go when you
In an example below, I am using @media queries to adjust the size of
I am new to Ruby, using ruby 1.9.2P180 and Rails 3.1.0.rc2 I have screen.css
Using CSS, I'm trying to specify the height of a span tag in Firefox,

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.