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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:15:24+00:00 2026-06-17T22:15:24+00:00

I’m designing a website that makes use of both parallax scrolling and modal boxes.

  • 0

I’m designing a website that makes use of both parallax scrolling and modal boxes. When you open one of the modal boxes, I’m using jQuery and CSS to add a class to the popup’s DIV element so that its opacity goes from 0 to 100; I’m using a transition to make this look pretty. When you close the box, jQuery strips the class out to set the opacity back to 0.

So that the modal boxes are more readable, I’ve put an overlay behind them (actually a containing DIV) that overlays a transparency over the rest of the screen using a width and height of 100%. I also use the same trick to take the opacity of this from 0 to 100 when the box is opened, and vice versa when it’s closed.

The problem lies in that even at opacity 0, the overlay is still “above” some of the screen, rendering links and text viewable but not selectable. I’ve tried setting the Z-Index to 0 and -1 when the overlay is meant to be hidden, but because the parallax scrolling (I’m using a customised version of the SCRN template, for reference http://rodrigob.com/themes/scrn/) uses Relative, Fixed and Absolute positioning, the Z-Index only applies to some of the site.

As a workaround, styling the overlay with Visibility:Hidden works (as does Display:None, but I want to avoid that for accessibility reasons), but this can’t be managed by a transition, so when the modal closes, it just disappears instead of fading out nicely.

Is there any way around this? I thought setting the Visibility to Hidden after the transition from 100 opacity to 0 had happened would work, but I don’t know how to do this, if it can even be done at all.

Thanks in advance.

  • 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-06-17T22:15:25+00:00Added an answer on June 17, 2026 at 10:15 pm

    Setting “opacity: 100” or “visibility: hidden” on the overlay isn’t actually removing the overlay. What you want to do is remove the element.

    Conceptually speaking the overlay is still there. Its like glass above your content, you can see but you can’t touch, the invisible overlay glass is still there.
    It’s like super transparent glass window thats been washed with windex
    That guy is the user trying to click on those links below the overlay.

    What you want to do is either remove the element from the DOM or set it to “display: none” after the transition.

    The best solution that is cross browser I would use is to set display: none after the animation.

    $(".overlay").animate({"opacity": "0"}, function(){
        $(this).hide();
        // OR REMOVE it
        // $(this).remove();
    });
    

    Personally I like to wrap my modals in a container and give it a fixed postion and remove the container along with the modal contents on hide but thats me.

    I also like jeffery’s fancy css transition end method too, if you want to be fancy with css3 but the caveat is you’d probably have to detect which vendor prefix you have to listen to.

    Here are the vendor prefixed transition ends:

    var transitionEnd = {
      'WebkitTransition' : 'webkitTransitionEnd'
      ,  'MozTransition'    : 'transitionend'
      ,  'OTransition'      : 'oTransitionEnd'
      ,  'msTransition'     : 'transitionend'
      ,  'transition'       : 'transitionend'
    }
    

    You’d have to write something to detect it which one is relevant to the user.

    $(".overlay").on(transitionEnd, function() {
        $(this).hide();
        // OR REMOVE it
        // $(this).remove();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am confused How to use looping for Json response Array in another Array.
I am using JSon response to parse title,date content and thumbnail images and place
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I've got a string that has curly quotes in it. I'd like to replace

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.