最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Zurb Foundation Reveal Disable Animation - Stack Overflow

programmeradmin0浏览0评论

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

Here's my fiddle and code:

/

<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="" frameborder="0" allowfullscreen></iframe>
  </div>
  <a class="close-reveal-modal">&#215;</a>
</div>

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

Here's my fiddle and code:

http://jsfiddle/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./embed/IkOQw96cfyE" frameborder="0" allowfullscreen></iframe>
  </div>
  <a class="close-reveal-modal">&#215;</a>
</div>
Share Improve this question asked Jul 12, 2013 at 19:56 RyanRyan 6,22716 gold badges55 silver badges89 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 8

Change your JavaScript call to the following:

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

Here's the jsFiddle: http://jsfiddle/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.

Change your JavaScript call to the following:

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

The problem, is that if you turn the animation off, the modal does not animate to where you are on the page (if you have scrolled down the page) - so do take note of this.

发布评论

评论列表(0)

  1. 暂无评论