Skip to content

Commit

Permalink
Merge pull request #66 from sauvainr/master
Browse files Browse the repository at this point in the history
fix issue #55
  • Loading branch information
aamirafridi committed Mar 11, 2016
2 parents 37b9531 + dc39db1 commit e800842
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jquery.marquee.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,14 +399,14 @@
//Add css3 animation to the element
$marqueeWrapper.css(animationString, animationCss3Str);
var keyframeCss = keyframeString + ' { 100% ' + _objToString(animationCss) + '}',
$styles = $('style');
$styles = $marqueeWrapper.find('style');

//Now add the keyframe animation to the head
//Now add the keyframe animation to the marquee element
if ($styles.length !== 0) {
//Bug fixed for jQuery 1.3.x - Instead of using .last(), use following
$styles.filter(":last").append(keyframeCss);
$styles.filter(":last").html(keyframeCss);
} else {
$('head').append('<style>' + keyframeCss + '</style>');
$marqueeWrapper.append('<style>' + keyframeCss + '</style>');
}

//Animation iteration event
Expand Down

0 comments on commit e800842

Please sign in to comment.