I hereby claim:
- I am patlaughlin on github.
- I am shakabrah (https://keybase.io/shakabrah) on keybase.
- I have a public key ASDpVvlrwgv6kw7a-UB4iUct5wzETG2wjqJJFky4AvCamAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
backgroundResize = function() { | |
var img = $('#home .content img'); | |
var imgHeight = img.height(); | |
var imgWidth = img.width(); | |
var wHeight = theWindow.height(); | |
var wWidth = theWindow.width(); | |
var visibleHeight = wHeight / imgHeight; | |
var visibleWidth = theWindow.width() / img.width(); | |
img.css('margin-left', -imgWidth * 0.5); |
@function perc($width, $container-width: $max-width) { | |
@return percentage($width / $container-width); | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>CodePen · A Pen by patlaughlin</title> | |
<!-- | |
Copyright (c) 2012 Patrick Laughlin, http://codepen.io/patlaughlin | |
Permission is hereby granted, free of charge, to any person obtaining |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>CodePen · A Pen by patlaughlin</title> | |
<!-- | |
Copyright (c) 2012 Patrick Laughlin, http://codepen.io/patlaughlin | |
Permission is hereby granted, free of charge, to any person obtaining |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>CodePen · A Pen by patlaughlin</title> | |
<!-- | |
Copyright (c) 2012 Patrick Laughlin, http://codepen.io/patlaughlin | |
Permission is hereby granted, free of charge, to any person obtaining |