Skip to content

Commit c2f7eeb

Browse files
committed
use local resources, fix firefox issue #30
1 parent c4522ba commit c2f7eeb

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ ehthumbs.db
2424
Thumbs.db
2525
node_modules
2626
bower_components
27+
28+
prepros.cfg

example/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<head>
55
<title>jQuery-Keyframes Example</title>
6-
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
6+
<script type="text/javascript" src="../bower_components/jquery/dist/jquery.min.js"></script>
77
<script type="text/javascript" src="../bower_components/prefixfree/prefixfree.min.js"></script>
88
<script type="text/javascript" src="../jquery.keyframes.js"></script>
99

jquery.keyframes.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
domPrefixes = ['Webkit', 'Moz', 'O', 'ms', 'Khtml'];
66

77
$(window).load(function(){
8-
var body = document.body;
9-
if( body.style.animationName !== undefined ) { animationSupport = true; }
8+
var style = document.body.style;
9+
if( style.animationName !== undefined ) { animationSupport = true; }
1010

1111
if( animationSupport === false ) {
1212
for( var i = 0; i < domPrefixes.length; i++ ) {
13-
if( body.style[ domPrefixes[i] + 'AnimationName' ] !== undefined ) {
13+
if( style[ domPrefixes[i] + 'AnimationName' ] !== undefined ) {
1414
prefix = domPrefixes[ i ];
1515
animationString = prefix + 'Animation';
1616
vendorPrefix = '-' + prefix.toLowerCase() + '-';
@@ -111,9 +111,9 @@
111111

112112
var animObjToStr = function(obj){
113113
obj = $.extend({
114-
duration: 0,
114+
duration: '0s',
115115
timingFunction: "ease",
116-
delay: 0,
116+
delay: '0s',
117117
iterationCount: 1,
118118
direction: "normal",
119119
fillMode: "forwards"
@@ -152,8 +152,8 @@
152152
}
153153
};
154154

155-
this.each(function() {
156-
var $el = $(this).addClass("boostKeyframe").css(vendorPrefix + animationPlayState, playStateRunning).css(animationkey, animationcss).data("keyframeOptions", frameOptions);
155+
this.each(function(index, elem) {
156+
var $el = $(elem).addClass("boostKeyframe").css(vendorPrefix + animationPlayState, playStateRunning).css(animationkey, animationcss).data("keyframeOptions", frameOptions);
157157

158158
if (callback) {
159159
_prefixEvent($el, 'AnimationIteration', callback);

jquery.keyframes.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)