This file contains hidden or 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
| var gulp = require('gulp'), | |
| gutil = require('gulp-util'), | |
| concat = require('gulp-concat'), | |
| less = require('gulp-less'), | |
| jshint = require('gulp-jshint'), | |
| stylish = require('jshint-stylish'), | |
| cssmin = require('gulp-minify-css'), | |
| htmlmin = require('gulp-minify-html'), | |
| uglify = require('gulp-uglify'), | |
| streamify = require('gulp-streamify'), |
This file contains hidden or 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
| /******************************************************************************* | |
| 1. DEPENDENCIES | |
| *******************************************************************************/ | |
| var gulp = require('gulp'); // gulp core | |
| sass = require('gulp-sass'), // sass compiler | |
| uglify = require('gulp-uglify'), // uglifies the js | |
| // jshint = require('gulp-jshint'), // check if js is ok | |
| rename = require("gulp-rename"); // rename files | |
| concat = require('gulp-concat'), // concatinate js |
This file contains hidden or 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
| // Extending jQuery.when | |
| if (jQuery.when.all === undefined) { | |
| jQuery.when.all = function(deferreds) { | |
| var deferred = new jQuery.Deferred(); | |
| $.when.apply(jQuery, deferreds).then( | |
| function() { | |
| deferred.resolve(Array.prototype.slice.call(arguments)); | |
| }, | |
| function() { |
This file contains hidden or 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 isVisible(el) { | |
| // get offset | |
| var y = getOffset(el, 'offsetTop'); | |
| // convert to screen coordinate | |
| y = y - window.scrollY; | |
| var height = el.clientHeight; | |
| var windowHeight = window.innerHeight; | |
| return (y + height > 0 && y < windowHeight); |
This file contains hidden or 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
| var ie = (function (){ | |
| if (window.ActiveXObject === undefined) return null; | |
| if (!window.XMLHttpRequest) return 6; | |
| if (!document.querySelector) return 7; | |
| if (!document.addEventListener) return 8; | |
| if (!window.atob) return 9; | |
| if (!document.__proto__) return 10; | |
| return 11; | |
| })(); |
This file contains hidden or 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
| easingTable = { | |
| linear: "linear", | |
| swing: "ease-out", | |
| bounce: "cubic-bezier(0,.35,.5,1.3)", | |
| // Penner equation approximations from Matthew Lein's Ceaser: http://matthewlein.com/ceaser/ | |
| easeInQuad: "cubic-bezier(.55,.085,.68,.53)", | |
| easeInCubic: "cubic-bezier(.55,.055,.675,.19)", | |
| easeInQuart: "cubic-bezier(.895,.03,.685,.22)", | |
| easeInQuint: "cubic-bezier(.755,.05,.855,.06)", | |
| easeInSine: "cubic-bezier(.47,0,.745,.715)", |
This file contains hidden or 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
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains hidden or 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
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains hidden or 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
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains hidden or 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> | |
| <title>data-binding test</title> | |
| </head> | |
| <body> | |
| <fieldset><legend>Text Input</legend> | |
| <div><label>Label: </label><span class="text"></span></div> | |
| <div><input class="text"></div> |