Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Remove background when modal pops up

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #168222
    doolz77
    Participant

    Hi,
    I am using jQuery CustomBox modal and all works fine. However, I am trying to ‘hide’ the content div behind the modal once popped up. I then want the content div to reappear again after the modal has closed. Here is the working example:

    http://codepen.io/doolz77/collab/4879c1495e17c1ee199997e08d394cd3/

    I have just been watching the jQuery videos from css-tricks but still having problems trying to get this to work :) Any help is much appreciated!

    Thanks!

    #168224
    Paulie_D
    Member

    Codepen link is having issues.

    “Room is full”? – Never seen that before. Perhaps you could provide the ‘non-collaborator’ link?

    #168229
    Paulie_D
    Member

    Ok…firstly, try giving the link a different color than the background so we can see it.

    #fadein {
      color: white;
    }
    

    Next…isn’t the OverlayColor / Opacity a setting in the instructions / CSS?

    http://dixso.github.io/custombox/

    #168232
    doolz77
    Participant

    Hi Paulie,
    Here is another link:
    http://codepen.io/doolz77/full/4879c1495e17c1ee199997e08d394cd3/

    The overlay color / opacity works fine. I just want the page directly behind the modal to hide when modal pops up, and then show again when modal is closed.

    The link to the actual page is here:

    http://www.akboheim.com/tsc/new.html

    Click on ‘CLICK ME’ and you can see the modal pops up fine, however, I’d like ONLY the background image of the cellar showing, not the page underneath it.

    Any suggestions??

    Many thanks!

    #168234
    Alan C
    Participant

    Why not make the modal just absolute and cover the content instead of hiding the div with the content in it? That way you can just toggle the modals visibility but the content is always there.

    #168236
    doolz77
    Participant

    @Alan C – thats not a bad idea :)

    I was wondering if hiding the content can be done vis css3 pseudo classes??

    #168244
    Alan C
    Participant

    Well its popular these days to use pseudo selectors to detect check-box states and use that to manipulate siblings. I suppose you could do that.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.