Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zurb Foundation Reveal Disable Animation

I'm trying to disable Foundation's Reveal animation, but it's still animating.

Here's my fiddle and code:

http://jsfiddle.net/ryanburnett/pSQjj/

<script>
  $('#videoModal').reveal({  
       animation: 'none' //fade, fadeAndPop, none
  });
</script>

<a href="#" data-reveal-id="videoModal" class="radius button">Example Modal w/Video&hellip;</a>
<div id="videoModal" class="reveal-modal large">
  <h2>This modal has video</h2>
  <div class="flex-video">
    <iframe width="800" height="315" src="http://www.youtube.com/embed/IkOQw96cfyE" frameborder="0" allowfullscreen></iframe>
  </div>
  <a class="close-reveal-modal">&#215;</a>
</div>
like image 357
Ryan Avatar asked Jan 13 '23 22:01

Ryan


1 Answers

Change your JavaScript call to the following:

$(document).foundation('reveal', {animation: 'none'});

Here's the jsFiddle: http://jsfiddle.net/pSQjj/1/

At least in this jsFiddle, it appears there may be a bug with closing the modal window with animation set to none, whereas it closes correctly if you change the configuration to fade or fadeAndPop. Let me know if you see the same bug in your app and I'll report it to the guys and gals at Zurb.

like image 166
chrisjsherm Avatar answered Jan 16 '23 01:01

chrisjsherm