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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:12:30+00:00 2026-05-27T21:12:30+00:00

I’m trying to implement a responsive design on my website and I’m getting a

  • 0

I’m trying to implement a responsive design on my website and I’m getting a little stuck on the featured content slider.

I’m using the Coda Slider for my featured content slides, and what I’d like to happen for small screen widths is to abort the jQuery function for the slider and remove the inline styles for the slide functions, so that it simply display’s block.

I was pretty sure I had seen examples like this before, but when I just went digging through my bookmarks for examples to post here, I couldn’t really find any that actually appear to work this way. Perhaps because limitations of JS would make this not feasible?

Here’s the jQuery I’m using to implement the slider. Is there anything I could simply add that would tell it to abort and return to normal for screen widths under a certain size?

   // Coda slider via http://www.ndoherty.biz/demos/coda-slider/2.0/

   $('#coda-slider-1').codaSlider({
        dynamicArrows: false,
        dynamicTabs: false,
        autoSlide: true,
        autoSlideInterval: 4000,
        slideEaseDuration: 500,
        autoSlideStopWhenClicked: true,
   });

For now I’m simply using two style sheets implemented with media queries as follows in the head:

<link rel="stylesheet" href="/css/2011/fullwidth-responsive.css" media="only screen and (min-width : 480px)" />
<link rel="stylesheet" href="/css/2011/mobile.css" media="only screen and (min-width : 320px) and (max-width : 480px)" />

So I’d like the JS abort to correspond with the mobile stylesheet kicking in, and essentially I will be presenting the content solely with CSS, and not using any JS presentational animations, etc., such as the slider does for the full site.

  • 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-27T21:12:30+00:00Added an answer on May 27, 2026 at 9:12 pm

    There are a couple ways you can do this, though there will always be some difference (unless you implemented a really advanced detection setup that responds to live window changes). Media queries will respond to any size changes (at any time), and our code here will only run once (right before we initialize the Coda slider):

    1. Detect width with a small check of screen available width:

    if ( screen.availWidth > 480 ) {
      // .. initialize Coda here ..
    }
    

    2. Detect a specific style you applied with your mobile stylesheet:

    For instance, say #header gets a height of 50px in your mobile.css. You can detect if that sheet is active by checking for that height:

    if ( $( "#header" ).width() != 50 ) {
      // .. initialize Coda here ..
    }
    

    There are other ways (Like creating a dummy media query, etc), but either of these should do what you want.

    Note: You may also need to have an “else” statement that removes/adds classes you might need for your mobile layout.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I used javascript for loading a picture on my website depending on which small
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

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.