diff --git a/.jshintrc b/.jshintrc index 1d35ce1..46bbeb9 100644 --- a/.jshintrc +++ b/.jshintrc @@ -17,5 +17,6 @@ "unused": true, "strict": true, "trailing": true, - "smarttabs": true + "smarttabs": true, + "jquery": true } diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b8e250..6ff5b12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ - + +### 1.1.5 (2014-05-27) + + + ### 1.1.4-0 (2014-05-27) diff --git a/Gruntfile.js b/Gruntfile.js index 6572ae2..ae7c424 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -80,7 +80,7 @@ module.exports = function (grunt) { }, dist: { options: { - jshintrc: 'src/.jshintrc' + jshintrc: '.jshintrc' }, src: ['.tmp/{,*/}*.js'] } diff --git a/README.md b/README.md index 4ef8a83..39d6eda 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ A jQuery plugin to dynamically apply [Dan Eden's animate.css][animate.css] anima [animate.css]: http://daneden.github.io/animate.css/ +[![Code Climate](https://codeclimate.com/github/craigmdennis/animateCSS.png)](https://codeclimate.com/github/craigmdennis/animateCSS) + ## Getting Started ### Bower diff --git a/animateCSS.jquery.json b/animateCSS.jquery.json index 957eb4c..781ff1c 100644 --- a/animateCSS.jquery.json +++ b/animateCSS.jquery.json @@ -2,7 +2,7 @@ "name": "animateCSS", "title": "Animate CSS jQuery Plugin", "description": "A jQuery plugin to dynamically apply animate.css animations with callbacks", - "version": "1.1.4", + "version": "1.1.5", "homepage": "https://github.com/craigmdennis/animateCSS.git", "author": { "name": "Craig Dennis", diff --git a/bower.json b/bower.json index 7d42eae..e18288a 100644 --- a/bower.json +++ b/bower.json @@ -2,7 +2,7 @@ "name": "animateCSS", "description": "A jQuery plugin to dynamically apply animate.css animations with callbacks", "main": "dist/jquery.animatecss.js", - "version": "1.1.4", + "version": "1.1.5", "dependencies": { "animate.css": "~3.1.1" }, diff --git a/dist/jquery.animatecss.js b/dist/jquery.animatecss.js index b79ae5a..7844104 100644 --- a/dist/jquery.animatecss.js +++ b/dist/jquery.animatecss.js @@ -1,4 +1,4 @@ -/*! animateCSS - v1.1.3-1 - 2014-05-27 +/*! animateCSS - v1.1.5 - 2014-05-27 * https://github.com/craigmdennis/animateCSS * Copyright (c) 2014 Craig Dennis; Licensed MIT */ @@ -14,19 +14,19 @@ settings = { effect: effect, delay: 0, - animationClass: "animated", + animationClass: 'animated', infinite: false, callback: options, debug: false }; - transitionEnd = "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend"; + transitionEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; settings = $.extend(settings, options); init = function(element) { return animate(element); }; animate = function(element) { if (settings.infinite === true) { - settings.animationClass += " infinite"; + settings.animationClass += ' infinite'; } return setTimeout(function() { unhide(element); @@ -35,24 +35,24 @@ }, settings.delay); }; addClass = function(element) { - return element.addClass(settings.effect + " " + settings.animationClass + " "); + return element.addClass(settings.effect + ' ' + settings.animationClass + ' '); }; unhide = function(element) { - if (element.css("visibility") === "hidden") { - element.css("visibility", "visible"); + if (element.css('visibility') === 'hidden') { + element.css('visibility', 'visible'); } - if (element.is(":hidden")) { + if (element.is(':hidden')) { return element.show(); } }; removeClass = function(element) { - return element.removeClass(settings.effect + " " + settings.animationClass); + return element.removeClass(settings.effect + ' ' + settings.animationClass); }; callback = function(element) { if (settings.infinite === false) { removeClass(element); } - if (typeof settings.callback === "function") { + if (typeof settings.callback === 'function') { return settings.callback.call(element); } }; diff --git a/dist/jquery.animatecss.min.js b/dist/jquery.animatecss.min.js index a595c02..ee50a6c 100644 --- a/dist/jquery.animatecss.min.js +++ b/dist/jquery.animatecss.min.js @@ -1,4 +1,4 @@ -/*! animateCSS - v1.1.3-1 - 2014-05-27 +/*! animateCSS - v1.1.5 - 2014-05-27 * https://github.com/craigmdennis/animateCSS * Copyright (c) 2014 Craig Dennis; Licensed MIT */ diff --git a/package.json b/package.json index 50edb35..3458ffd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "animateCSS", - "version": "1.1.4", + "version": "1.1.5", "description": "Animate CSS jQuery Plugin", "keywords": [ "jquery-plugin", diff --git a/src/.jshintrc b/src/.jshintrc deleted file mode 100644 index 1f1ee1d..0000000 --- a/src/.jshintrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "curly": true, - "eqeqeq": true, - "immed": true, - "latedef": true, - "newcap": true, - "noarg": true, - "sub": true, - "undef": true, - "unused": true, - "boss": true, - "eqnull": true, - "browser": true, - "devel" : true, - "predef": ["jQuery"] -} diff --git a/src/animatecss.coffee b/src/animatecss.coffee index f113a43..46316a6 100644 --- a/src/animatecss.coffee +++ b/src/animatecss.coffee @@ -13,13 +13,13 @@ $.fn.extend settings = effect: effect delay: 0 - animationClass: "animated", + animationClass: 'animated', infinite: false callback: options debug: false # Vendor prefixed transition callbacks - transitionEnd = "webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend" + transitionEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend' # Merge default settings with options. settings = $.extend settings, options @@ -31,7 +31,7 @@ $.fn.extend # Add the animation effect with classes animate = ( element ) -> if settings.infinite == true - settings.animationClass += " infinite" + settings.animationClass += ' infinite' # Run a timer regardless of delay (as 0 will fire instantly anyway) setTimeout -> @@ -42,23 +42,23 @@ $.fn.extend # Add the animation ad effect classes to kick everything off addClass = ( element ) -> - element.addClass( settings.effect + " " + settings.animationClass + " ") + element.addClass( settings.effect + ' ' + settings.animationClass + ' ') # Check if the element has been hidden to start with unhide = ( element ) -> - element.css("visibility", "visible") if element.css( "visibility" ) == "hidden" - element.show() if element.is(":hidden") + element.css('visibility', 'visible') if element.css( 'visibility' ) == 'hidden' + element.show() if element.is(':hidden') # Remove the animation classes the were applied removeClass = ( element ) -> - element.removeClass( settings.effect + " " + settings.animationClass ) + element.removeClass( settings.effect + ' ' + settings.animationClass ) callback = ( element ) -> # Only remove the animation classes if `infinite` is false removeClass( element ) if settings.infinite == false # Check if the callback is a function - if typeof settings.callback == "function" + if typeof settings.callback == 'function' # Execute the callback and return the origin element as `this` settings.callback.call( element )