Skip to content

Instantly share code, notes, and snippets.

View Reigard's full-sized avatar
🏠
Working from home

Alex Reigard

🏠
Working from home
View GitHub Profile
@Reigard
Reigard / Flex image
Last active July 31, 2016 06:01
jQuery | Flex image
var winWidth = $(window).width();
function flexImage() {
var flex = winWidth - 1920;
$('.flex-img').each(function() {
$(this).css({
"background-position" : flex/2 + "px 0"
});
});
}
@Reigard
Reigard / Animate CSS + WayPoints Plugin
Last active July 31, 2016 06:02
jQuery | Animate CSS + WayPoints Plugin
;(function($) {
var defaults = {
animation: 'fadeIn',
waypoint: false,
offset: '90%',
direction: "down",
infinite: false
};
@Reigard
Reigard / Prevent drag for <img> and <a>
Last active July 31, 2016 06:02
jQuery | Prevent dragstart
$("img, a").on("dragstart", function(event) { event.preventDefault(); });
@Reigard
Reigard / Simple plugin for animate.css
Last active July 31, 2016 06:02
jQuery | Animate CSS Plugin
;(function($) {
var defaults = {
animation: 'fadeIn',
timeout: 0,
infinite: false
};
$.fn.animated = function(options) {