- Semantic markup
- HTML standards mode and quirks mode
- HTML fundamentals
- Classes and IDs
- CSS fundamentals
- Selectors
- Resets and normalizers
- The box model
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() { | |
$('a[href*=#]:not([href=#])').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
$('html,body').animate({ | |
scrollTop: target.offset().top | |
}, 1000); | |
return false; |
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
/** | |
* Stand alone polyfill allow only numbers on input of type number. | |
* | |
* While input filtering is already supported by default by some browsers, maximum length has not been implemented by | |
* any. This script will solve both issue and make sure that only digits can be entered in input elements of type | |
* number. If the optional attribute `max` is set, it will calculate it's length and mimic the `maxlength` behavior on | |
* input of type text. | |
* | |
* Supports: | |
* |
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
export default TutorialComponent.extend({ | |
result: null, | |
actions: { | |
findStores() { | |
let geolocation = this.get('geolocation'); | |
let store = this.get('store'); | |
geolocation.getCoords() | |
.then(coords => store.getNearbyStores(coords)) | |
.then(result => { |
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
export default TutorialComponent.extend({ | |
result: null, | |
isFindingStores: false, | |
actions: { | |
findStores() { | |
if (this.isFindingStores) { return; } | |
let geolocation = this.get('geolocation'); | |
let store = this.get('store'); |
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
export default TutorialComponent.extend({ | |
result: null, | |
isFindingStores: false, // Add a Loading Spinner | |
actions: { | |
findStores() { | |
if (this.isFindingStores) { return; } // Preventing Concurrency | |
let geolocation = this.get('geolocation'); | |
let store = this.get('store'); |
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
import { task } from 'ember-concurrency'; | |
export default TutorialComponent.extend({ | |
result: null, | |
findStores: task(function * () { | |
let geolocation = this.get('geolocation'); | |
let store = this.get('store'); | |
let coords = yield geolocation.getCoords(); |
OlderNewer