Skip to content

Instantly share code, notes, and snippets.

@remcorakers
Last active December 27, 2015 20:28
Show Gist options
  • Save remcorakers/7384287 to your computer and use it in GitHub Desktop.
Save remcorakers/7384287 to your computer and use it in GitHub Desktop.
if (!$.support.transition) {
$.fn.transition = $.fn.animate;
}
function animateFog(fogId, delay) {
var duration = 5000;
$(fogId).delay(delay)
.transition({opacity: 0.4, x: "15px", y: "-4px"}, duration, "linear")
.transition({opacity: 0.8, x: "-5px", y: "10px"}, duration, "linear")
.transition({opacity: 0.4, x: "-15px", y: "4px"}, duration, "linear")
.transition({opacity: 0.8, x: "5px", y: "-10px"}, duration, "linear", function() {
animateFog(fogId);
});
}
animateFog("#fog1");
animateFog("#fog2", 7000);
animateFog("#fog3", 3000);
$("#example-1 .demo").click(function() {
$("#logo").effect('shake', { times: 4, distance: 4 }, 150);
$("#lightning1").fadeIn("200", function() {
$("#lightning1").fadeOut("200", function() {
$("#lightning2").fadeIn("200", function() {
$("#lightning2").fadeOut("200");
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment