Skip to content

Instantly share code, notes, and snippets.

View joshuarule's full-sized avatar

Joshua Rule Dobson joshuarule

  • Funko
  • Tacoma, Wa
  • 05:45 (UTC -07:00)
View GitHub Profile
@joshuarule
joshuarule / SassMeister-input-HTML.haml
Created March 15, 2014 18:49
Generated by SassMeister.com.
.container
.left
left
.cf
.middle
middle
.right
right
@joshuarule
joshuarule / base.scss
Last active August 29, 2015 14:06
JS/CSS Breakpoint Detection
body {
&:after {
content: 'mobile';
display: none;
@include breakpoint($break) {
content: 'tablet';
}
@joshuarule
joshuarule / scollto.js
Last active August 29, 2015 14:06
scollto div
// scrollto
//
// $fix 84 is equal to height of header
$.fn.scrollView = function () {
return this.each(function () {
$('html, body').animate({
scrollTop: $(this).offset().top - 84
}, 1000);
});
}
@joshuarule
joshuarule / SassMeister-input-HTML.haml
Created October 28, 2014 16:12
Generated by SassMeister.com.
.container
.wrap
.box-1
.box-2
.cf
@joshuarule
joshuarule / SassMeister-input-HTML.haml
Created October 28, 2014 16:13
Generated by SassMeister.com.
.container
.wrap
.box-1
.box-2
.cf
@joshuarule
joshuarule / SassMeister-input-HTML.haml
Created November 18, 2014 20:52
Generated by SassMeister.com.
%ul
%li
this is my base li
%ul.unique
%li.unique-li
this is my unique li
@joshuarule
joshuarule / SassMeister-input.scss
Last active August 29, 2015 14:10
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
%flush {
color: red;
}
@mixin flush {
@joshuarule
joshuarule / index.html
Created December 5, 2014 01:22
Select contentEditable text: http://jsbin.com/wivajetove
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="edit" contenteditable="true">test</div>
<button onclick="toogleSelectionText()">select/deselect</button>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div id="edit" contenteditable="true">test</div>
<button onclick="toogleSelectionText()">select/deselect</button>
<script id="jsbin-javascript">
  1. Between the <body> tags, before <div data-montage-id="montageVersion"></div>, add the following markup:

    <h1>Temperature Converter</h1>
    <div data-montage-id="tempConverter"></div>

The data-montage-id custom data attribute is used to identify elements in the markup whose behavior you want to control. The objects that control these elements are located within the script block in the head area of the HTML document.