0
votes

I'm having some issues trying to remove the reveal modal background

The documentation gives several options but none of them work: http://foundation.zurb.com/docs/components/reveal.html

Remove background:

<div class="reveal-modal-bg" style="display: none"></div>

Optional Javascript Configuration:

Reveal options can only be passed in during initialization at this time. However, you can bind to the open, opened, close, and closed events.

I tried returning this object literal in the event callback, but that doesn't work:

$(document).on('open.fndtn.reveal', '[data-reveal]', function () {
  return {bg_class: 'noBackground'}
});

{

  animation: 'fadeAndPop',
  animation_speed: 250,
  close_on_background_click: true,
  dismiss_modal_class: 'close-reveal-modal',
  bg_class: 'reveal-modal-bg',
  root_element: 'body',
  bg : $('.reveal-modal-bg'),
  css : {
    open : {
      'opacity': 0,
      'visibility': 'visible',
      'display' : 'block'
    },
    close : {
      'opacity': 1,
      'visibility': 'hidden',
      'display': 'none'
    }
  }
}

Can you please help?

thx,

2

2 Answers

1
votes

Don't use display: none, just use css and set the background color to transparent in your css (you need to load your css after foundation's in order to override its styles) - though I'm not sure why you'd want to?:

.reveal-modal {
background-color: transparent;}
-1
votes

Not the nicest option, but a quick fix would be to use:

style="display: none!important"

For the "reveal-modal-bg".