Zurb Foundation Reveal Disable Animation

I am trying to turn off Foundation Reveal animation, but it is still animating.

Here is 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> 
+4
source share
2 answers

Change your javascript call to the following:

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

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

At least in this jsFiddle there is an error with closing the modal window with the animation set to none , while it closes correctly if you change the configuration to fade or fadeAndPop . Let me know if you see the same error in your application, and I will report it to the guys and guys in Zurb.

+8
source

Change your javascript call to the following:

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

The problem is that if you turn off the animation, the modal will not come close to where you are on the page (if you scroll down the page), so pay attention to this.

+1
source

Source: https://habr.com/ru/post/1491189/


All Articles