“2013: Haskell people are still writing monad tutorials, JavaScript people are still trying to explain inheritance.”
I don't know how to name my blog, just undefined.
“2013: Haskell people are still writing monad tutorials, JavaScript people are still trying to explain inheritance.”
Horwheel Component makes it easy to implement horizontal scrolling with a user’s mouse wheel. It’s cross-browser compatible:
$ component install pazguille/horwheel
See: https://github.com/component/component
First, require horwheel:
var horwheel = require('horwheel');
Then, define your wrapper:
var wrapper = document.querySelector('#wrapper');
Finally, execute horwheel function with wrapper parameter:
horwheel(wrapper);
Also, you can use it without components. First, add standalone file:
<script src="../standalone/horwheel.js" type="text/javascript"></script>
Then, define your wrapper:
var wrapper = document.querySelector('#wrapper');
Finally, execute horwheel function with wrapper parameter:
horwheel(wrapper);
“Be Native.
Browser makers spend countless hours building native support for a lot of things in order to improve both user’s experience and developer’s life. Use these native features.”– by Hugo Giraudel
Hoisting is the JavaScript interpreter’s action of moving all variable and function declarations to the top of the current scope.
textarea.addEventListener('input', function () {
this.style.height = 'auto';
this.style.height = this.scrollHeight + 'px';
});
Demo
;("header footer section aside nav article figure figcaption hgroup time").replace(/\w+/g,function(a){document.createElement(a)})
NOTE : Put it in the head tag, or this wouldn’t work.
By - Matthias Le Brun
You should use JSlint or JShint to validate your JavaScript code quality:
JavaScript Rules!
Fin.
“JavaScript doesn’t suck, you’re just doing it wrong.”
– by Douglas Crockford