Permalink
Browse files

Fix to fadeAndPop animation for jQuery 1.6

  • Loading branch information...
1 parent a2cdd5e commit a72aa4a8535d364ab9aeb79e406c7403825496ca @mkelly12 mkelly12 committed May 4, 2011
Showing with 5 additions and 3 deletions.
  1. +2 −1 demo.html
  2. +3 −2 jquery.reveal.js
View
3 demo.html
@@ -14,7 +14,8 @@
<link rel="stylesheet" href="reveal.css">
<!-- Attach necessary scripts -->
- <script type="text/javascript" src="jquery-1.4.4.min.js"></script>
+ <!-- <script type="text/javascript" src="jquery-1.4.4.min.js"></script> -->
+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.min.js"></script>
<script type="text/javascript" src="jquery.reveal.js"></script>
<style type="text/css">
View
5 jquery.reveal.js
@@ -89,7 +89,7 @@
modal.css({'top': $(document).scrollTop()-topOffset, 'opacity' : 0, 'visibility' : 'visible'});
modalBG.fadeIn(options.animationspeed/2);
modal.delay(options.animationspeed/2).animate({
- "top": $(document).scrollTop()+topMeasure,
+ "top": $(document).scrollTop()+topMeasure + 'px',
"opacity" : 1
}, options.animationspeed,unlockModal());
}
@@ -113,9 +113,10 @@
if(!locked) {
lockModal();
if(options.animation == "fadeAndPop") {
+ // debugger;
modalBG.delay(options.animationspeed).fadeOut(options.animationspeed);
modal.animate({
- "top": $(document).scrollTop()-topOffset,
+ "top": $(document).scrollTop()-topOffset + 'px',
"opacity" : 0
}, options.animationspeed/2, function() {
modal.css({'top':topMeasure, 'opacity' : 1, 'visibility' : 'hidden'});

0 comments on commit a72aa4a

Please sign in to comment.