Skip to content

Instantly share code, notes, and snippets.

View mware's full-sized avatar
:octocat:
working

Michael Ware mware

:octocat:
working
View GitHub Profile
@mware
mware / mobile-link-fix.css
Created November 19, 2012 13:18
Removing outlines/highlights on links in mobile browsers
@mware
mware / jquery.add-body-class.js
Created November 20, 2012 16:12
add body class based on the url using RegEx
/* add body class */
var loc = window.location.pathname.match(/^\/?(\w+)\b/);
if(loc) $(document.body).addClass(loc[1].toLowerCase());
@mware
mware / smooth scroll animation
Created August 7, 2013 19:32
smooth scroll to an element using jQuery
$('html, body').animate({
scrollTop: $("#elementID").offset().top
}, 2000);
@mware
mware / rem-adjustment.sass
Created October 13, 2015 16:23
From chrome://newtab/
/* Document level adjustments for rems */
html {
font-size: 18px;
}
@media (max-width: 900px) {
html { font-size: 15px; }
}
@media (max-width: 400px) {
<meta property="og:title" content="Facebook Open Graph META Tags"/>
<meta property="og:image" content="http://davidwalsh.name/wp-content/themes/klass/img/facebooklogo.png"/>
<meta property="og:site_name" content="David Walsh Blog"/>
<meta property="og:description" content="Facebook's Open Graph protocol allows for web developers to turn their websites into Facebook "graph" objects, allowing a certain level of customization over how information is carried over from a non-Facebook website to Facebook when a page is 'recommended', 'liked', or just generally shared."/>