var myBody = document.querySelector('body')
, mjölnir = new Hammer(myBody)
, menuElem = document.querySelector('.menu')
, hamburger = document.querySelector('.menu--icon')
, showMenu = function () {
menuElem.style.left = 0;
};
//BASIC Interaction
hamburger.addEventListener('click', function () {
showMenu();
});
//Progressive Enhancement happens HERE!
mjölnir.on('swiperight', function () {
showMenu();
});
.tabs {
float:none;
height: 2em;
width: 90%;
}
@media screen and (min-width: 30em){
.tabs {
float:left;
width: 10em;
}
}
@media print {
body {
color: rgb(0, 0, 0);
background: none;
}
.footer {
display:none;
}
}
var heroObj = {
name: 'Tom Starks',
power: 'money',
armor: 80,
flight: true
};
//persisting data to the browser
window.localforage.set('ironguy', heroObj);
//getting data back out of the browser
window.localforage.get('ironguy').then(function (hero) {
console.log(hero);
});
angular.module('lfeApp').factory('UsersService',['$resource', function($resource){
var users = $resource('/users', {id: '@id'}, {
get: {isArray: true}
}, { offline: true, encrypt: false});
return {
users: users
};
}]);