This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
require('jit-grunt')(grunt); | |
grunt.initConfig({ | |
less: { | |
development: { | |
options: { | |
compress: true, | |
yuicompress: true, | |
optimization: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch: { | |
styles: { | |
files: ['src/**/*.*'], // which files to watch | |
tasks: ['less', 'copy:main', 'concat:dist', 'concat:libJs', 'concat:js', 'uglify', 'copy:app'], | |
options: { | |
nospawn: true | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function countCSSRules() { | |
var results = '', | |
log = ''; | |
if (!document.styleSheets) { | |
return; | |
} | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
countSheet(document.styleSheets[i]); | |
} | |
function countSheet(sheet) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<!--[if lte IE 8]> | |
<script type="text/javascript" src="js/ie8.polyfils.min.js"></script> | |
<![endif]--> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Iframe Resizer</title> | |
<style>iframe{width:100%}</style> | |
</head> | |
<body> | |
<iframe src="http://anotherdomain.com/iframedPage.html" scrolling="no"></iframe> | |
<script>iFrameResize({log:true})</script> | |
<!--put log:false to turn off the logging--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(event) { | |
function handleMenu(){ | |
$('.page-container').toggleClass('open'); | |
} | |
$('#toggle').on('click', function(e){ | |
e.preventDefault(); | |
handleMenu(); | |
return false; | |
}) | |
$('body').on('click', function(e){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Demo : Guide to create off canvas navigation menu | Time to Hack</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> | |
<link rel="stylesheet" href="offcanvas.style.css"> | |
</head> | |
<body> | |
<div class="page-container left"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body{ | |
padding: 0; | |
margin: 0; | |
font-family: 'Source Sans Pro', 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; | |
font-size: 18px; | |
} | |
.animated{ | |
transition: all ease-out 0.4s; | |
} | |
.clearfix{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Decoding Morse Code With JavaScript</title> | |
<style type="text/css"> | |
div.output {} | |
div.output p.message { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Provides the overlapping status between two elements | |
* based on the passed in Element objects | |
* | |
* @param {Element, Element} Element object of DOM | |
* @return {Boolean} overlap status or null if native object not received | |
*/ | |
const isOverlapping = (e1, e2) => { | |
if (e1.length && e1.length > 1) { | |
e1 = e1[0]; |