Event delegation is monitoring events on descendants via a common parent. This reduces overhead and allows for descendants not yet created to inherit the functionality. In addition, the term Event Bubbling is when an event is fired on an element and it “bubbles” up the DOM to the nearest ancestor with a handler for that […]
DNS Prefetching to speed page loads <link rel=”dns-prefetch” href=”//fonts.googleapis.com”> Link Prefetching to speed subsequent page loads on your site <link rel=”prefetch” href=”http://daker.me/2013/05/hello-world.html” /> or for even faster loads use <link rel=”prerender” href=”http://daker.me/2013/05/hello-world.html” /> Download Attribute to force a file to download rather than going to that page …<a href=”download_pdf.php?id=15″ download=”myfile.pdf”>Download PDF</a> Regular Expressions to validate form fields with […]
Install the Grunt command line tool (requires node.js installed on your machine)… sudo npm install grunt-cli -g Create package.json in root of project (list of Grunt plugin dependencies) npm install (install the dependencies) Create Gruntfile.js in root of project (configuration) Basically, you need three different functions to work with Grunt: grunt.initConfig, grunt.loadNpmTasks, and grunt.registerTask Resources Grunt: A Build Tool […]