#target / context = result
http://caniuse.com/#search=rem
html {
font-size: 16px;
}
| const arr1 = [1,2,3] | |
| const arr2 = [4,5,6] | |
| const arr3 = [...arr1, ...arr2] //arr3 ==> [1,2,3,4,5,6] |
| { | |
| // http://eslint.org/docs/rules/ | |
| "ecmaFeatures": { | |
| "binaryLiterals": false, // enable binary literals | |
| "blockBindings": false, // enable let and const (aka block bindings) | |
| "defaultParams": false, // enable default function parameters | |
| "forOf": false, // enable for-of loops | |
| "generators": false, // enable generators | |
| "objectLiteralComputedProperties": false, // enable computed object literal property names | |
| "objectLiteralDuplicateProperties": false, // enable duplicate object literal properties in strict mode |
#target / context = result
http://caniuse.com/#search=rem
html {
font-size: 16px;
}
| // From Here: http://www.gianlucaguarini.com/blog/detecting-the-tap-event-on-a-mobile-touch-device-using-javascript/ | |
| var getPointerEvent = function(event) { | |
| return event.originalEvent.targetTouches ? event.originalEvent.targetTouches[0] : event; | |
| }; | |
| var $touchArea = $('#touchArea'), | |
| touchStarted = false, // detect if a touch event is sarted | |
| currX = 0, | |
| currY = 0, | |
| cachedX = 0, |
| Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) { | |
| console.log(v1) | |
| switch (operator) { | |
| case '==': | |
| return (v1 == v2) ? options.fn(this) : options.inverse(this); | |
| case '===': | |
| return (v1 === v2) ? options.fn(this) : options.inverse(this); | |
| case '<': | |
| return (v1 < v2) ? options.fn(this) : options.inverse(this); | |
| case '<=': |
| /** | |
| * http://nicolasgallagher.com/micro-clearfix-hack/ | |
| * For modern browsers | |
| * 1. The space content is one way to avoid an Opera bug when the | |
| * contenteditable attribute is included anywhere else in the document. | |
| * Otherwise it causes space to appear at the top and bottom of elements | |
| * that are clearfixed. | |
| * 2. The use of `table` rather than `block` is only necessary if using | |
| * `:before` to contain the top-margins of child elements. | |
| */ |
| @font-face { | |
| font-family: 'MyWebFont'; | |
| src: url('webfont.eot'); /* IE9 Compat Modes */ | |
| src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ | |
| url('webfont.woff') format('woff'), /* Modern Browsers */ | |
| url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */ | |
| url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */ | |
| } | |
| /*Read More Here: |
| Info here: https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes | |
| and here: http://www.w3schools.com/cssref/css_selectors.asp | |
| --- | |
| :active | |
| :checked | |
| :default | |
| :dir() | |
| :disabled | |
| :empty | |
| :enabled |
| // Firstly you need access to the JSON file to wrap it in a “callback function”. | |
| //In this case I have called it “jsonCallback”. This will be the function called by the AJAX request. | |
| jsonCallback( | |
| { | |
| "sites": | |
| [ | |
| { | |
| "siteName": "JQUERY4U", | |
| "domainName": "http://www.jquery4u.com", | |
| "description": "#1 jQuery Blog for your Daily News, Plugins, Tuts/Tips & Code Snippets." |
| AL|Alabama | |
| AK|Alaska | |
| AZ|Arizona | |
| AR|Arkansas | |
| AS|American Samoa | |
| CA|California | |
| CO|Colorado | |
| CT|Connecticut | |
| DE|Delaware | |
| DC|District of Columbia |