Essential Javascript Cheat Sheet

, 2/10/2017

Note : All the content here comes from this awesome article : https://www.codementor.io/johnnyb/javascript-cheatsheet-fb54lz08k This cheat sheet include a couple of browser features you can access with JavaScript on the client side and platform-agnostic features you can use either on the ...

View more

Grunt config

27/09/2017

Grunt is a JavaScript Task Runner that will help you to minify, compile, unit test or lint your code. Installation This will put the grunt command in your system path, allowing it to be run from any directory. npm install ...

View more

Bower config

27/09/2017

Bower is a package manager for the web that will help you to manage dependencies of your projects. Bower depends on Node.js and npm. Also make sure that git is installed as some bower packages require it to be fetched ...

View more

Javascript objects

, 25/09/2017

Real Life Objects, Properties, and Methods In real life, a car is an object. A car has properties like weight and color, and methods like car.start() and car.stop(). Objects are variables too. But objects can contain many values. This code ...

View more

Javascript Arrays

, 25/09/2017

JavaScript arrays are used to store multiple values in a single variable. var cars = ["Saab", "Volvo", "BMW"]; What is it ? An array is a special variable, which can hold more than one value at a time. If you ...

View more

Useful jQuery pattern

, 24/09/2017

jQuery lightweight plugin pattern /*! * jQuery lightweight plugin boilerplate * Original author: @ajpiano * Further changes, comments: @addyosmani * Licensed under the MIT license */ // the semi-colon before the function invocation is a safety // net against concatenated ...

View more

Javascript arrays methods

, 24/09/2017

Converting Arrays to Strings The JavaScript method toString() converts an array to a string of (comma separated) array values. var fruits = ["Banana", "Orange", "Apple", "Mango"]; document.getElementById("demo").innerHTML = fruits.toString(); // result : Banana,Orange,Apple,Mango The join() method also joins all array ...

View more

jQuery vs Vanilla

, 23/09/2017

Here are some codes snippets to use if you don’t necessarily need jQuery : Event // jQuery $(document).ready(function() { // code }) // Vanilla document.addEventListener('DOMContentLoaded', function() { // code }) // jQuery $('a').click(function() { // code… }) // Vanilla [].forEach.call(document.querySelectorAll('a'), ...

View more

Css masking with blend-modes

, 27/04/2016

I’ve been very impressed by the site of Nurture Digital created by Bryan James so I wanted to recreate the masking technic he used for the home page. I searched the web, but could not find answers about masking technic ...

View more