Skip to content

Instantly share code, notes, and snippets.

View willwright82's full-sized avatar
👾
parsleybox.com

Will Wright willwright82

👾
parsleybox.com
View GitHub Profile
@willwright82
willwright82 / EmailValidation-Regex
Created September 16, 2014 16:19
Regex Email Validation
[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?
@willwright82
willwright82 / FlexBox-Align
Created September 17, 2014 14:15
FlexBox for Bootstrap3
<style>
.vertical-align {
display: flex;
align-items: center;
/*align-items: baseline;*/
justify-content: center;
flex-direction: row;
}
</style>
@willwright82
willwright82 / Pull-Down
Created September 19, 2014 13:42
Align content to bottom jQuery
$('.pull-down').each(function() {
$(this).css('margin-top', $(this).parent().height()-$(this).height())
});
@willwright82
willwright82 / BackgroundImageOpacity
Created September 22, 2014 09:05
Change a CSS Background Image’s Opacity with Pseudo Elements
<div class="my-container">
<h1>Heading 1</h1>
</div>
<style>
.my-container {
position: relative;
background: #5C97FF;
overflow: hidden;
}
@willwright82
willwright82 / CSSMediaQueries.scss
Last active May 8, 2017 08:45
Bootstrap 3 Media Queries
/*==================================================
= Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
@willwright82
willwright82 / ClientSideInclude
Created September 23, 2014 09:18
Client Side Jquery Include
function unWrapPlaceholder() {
$(this).contents().unwrap();
}
$(function() {
$("#includedContent").load("b.html", unWrapPlaceholder);
$("#headerContent").load("h.html", unWrapPlaceholder);
$("#footerContent").load("f.html", unWrapPlaceholder);
});
@willwright82
willwright82 / SocialAfterPageLoad
Created September 23, 2014 14:09
Load Social Plugins after Page
<script>
$(window).bind("load", function() {
$.getScript('js/social.js', function() {});
});
</script>
@willwright82
willwright82 / CSS-Shapes
Created September 24, 2014 09:46
Wrapping content around custom shape paths
<!-- In depth Article @ http://www.html5rocks.com/en/tutorials/shapes/getting-started/ -->
<img class=”element” src=”image.png” />
<p>Lorem ipsum…</p>
<style>
@supports (shape-outside: circle(50%)) {
/* styles only for browsers which support CSS Shapes */
.element {
/* Image Based */
shape-outside: url(image.png);
@willwright82
willwright82 / MultipleBgs
Created October 2, 2014 15:17
Using Modernizr MultipleBgs
.multiplebgs body {
background:
url(top.png) 600px 10px no-repeat,
url(middle.png) 10px 10px no-repeat,
url(bottom.png);
}
.no-multiplebgs body {
background: url(lame-fallback.png) 600px 10px no-repeat;
}
@willwright82
willwright82 / BS3-NoGutter
Created October 16, 2014 14:49
Bootstrap 3 No-Gutter Helper Class
.no-gutter > [class*='col-'] {
padding-right:0;
padding-left:0;
}