var throttle = {
switch:false,
timer:100,
process:function(method,context){
var self = this;
if(self.switch){
return;
}
self.switch = true;
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
| // UMD dance - https://github.com/umdjs/umd | |
| !function(root, factory) { | |
| if (typeof define === 'function' && define.amd) { | |
| define(['jquery'], factory); | |
| } else { | |
| factory(root.jQuery); | |
| } | |
| }(this, function($) { | |
| 'use strict'; |
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 getVendorPropertyName(prop) { | |
| // Handle unprefixed versions (FF16+, for example) | |
| if (prop in div.style) return prop; | |
| var prefixes = ['Moz', 'Webkit', 'O', 'ms']; | |
| var prop_ = prop.charAt(0).toUpperCase() + prop.substr(1); | |
| for (var i=0; i<prefixes.length; ++i) { | |
| var vendorProp = prefixes[i] + prop_; | |
| if (vendorProp in div.style) { return vendorProp; } |
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
| // Some versions to test [v1, v2, expected result] | |
| var versions = [ | |
| ['1.2.0', '1.2', 0], | |
| ['1.4', '1.7.2', 1], | |
| ['1.2pre', '1.2', 1], | |
| ['1.7', '1.1.1', -1], | |
| ['1.7.9RC1', '1.7.9RC2', 1], | |
| ['1.7.9RC1', '1.7.9RC', -1], | |
| ['1.7.9RC1', '1.7.9', 1], | |
| ['0.4beta', '0.4', 1], |
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
| /** | |
| * Simply compares two string version values. | |
| * | |
| * Example: | |
| * versionCompare('1.1', '1.2') => -1 | |
| * versionCompare('1.1', '1.1') => 0 | |
| * versionCompare('1.2', '1.1') => 1 | |
| * versionCompare('2.23.3', '2.22.3') => 1 | |
| * | |
| * Returns: |
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
| /*! | |
| * isVis - v0.5.5 Aug 2011 - Page Visibility API Polyfill | |
| * Copyright (c) 2011 Addy Osmani | |
| * Dual licensed under the MIT and GPL licenses. | |
| */ | |
| (function () { | |
| window.visibly = { | |
| b: null, | |
| q: document, |
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
| node_modules | |
| *.swp |
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
| form | |
| input(type='radio' name='tab')#menu | |
| .container | |
| input(type='radio' name='tab' checked)#home | |
| section.home | |
| h1 Home | |
| label(for='home') | |
| input(type='radio' name='tab')#about | |
| section.about | |
| h1 About |
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
| server { | |
| server_name yoursite.com; | |
| root /usr/share/html; | |
| index index.html; | |
| location / { | |
| try_files $uri $uri/ /index.html; | |
| } | |
| } |