Turn.js Digital Publishing PRO

Turn.js is a JavaScript library that allows us to create digital books the user can flip through their pages. Although the library is available as an open source project on GitHub there are some restrictions on using it. Make sure you check the license terms before you choose to use it. The following code sample […]

LESS.js Jump Start PRO

The LESS.js JavaScript library allows us to extend our CSS with dynamic behavior such as variables, mixins, operations and functions. The following code sample shows how simple it is to create new variables assigned with values so that we could reuse them in our code. The following is the LESS code. @myblue: #4C65BC; .stuff {color:@myblue} The […]

Video Capturing in HTML5 PRO

HTML5 allows us to capture the video and the audio stream coming from the device camera and microphone. The following code sample shows how simple it is to do it. <!DOCTYPE html> <html> <head> <title>sample for video capturing using html5</title> </head> <body> <video autoplay width=”480″ height=”360″></video> <input type=”button” id=”stopbt” value=”stop”/> <script type=”text/javascript”> window.URL = window.URL […]

Lambda Expressions in JavaScript PRO

The Harmony (EcmaScript 6) proposal includes the specification for arrow functions, AKA lambda expressions. Given this technology early stage you should check in advance whether the web browser you target supports it. The following code sample includes the definition for few arrow functions (lambda expressions). <!DOCTYPE html> <html> <head> <title>simple lambda expressions in javascript</title> </head> <body> […]

Google Charts Jump Start PRO

The Google Charts JavaScript library provides us with the capability to create various types of charts. The Google Charts library is available online hosted on Google servers. The following code sample shows how we can create a simple pie chart using the Google Charts JavaScript library. <html> <head> <script type=”text/javascript” src=”https://www.google.com/jsapi”></script> <script type=”text/javascript”> google.load(“visualization”, “1”, […]

Microtext.js Jump Start PRO

The Microtext.js open source JavaScript library provides us with useful functions for working with texts. Using this library is fairly simple. It doesn’t require any other library. The following code sample shows how simple it is to use the functions this library provides us with. <!DOCTYPE html> <html> <head> <title>microtext.js demo</title> <script type=”text/javascript” src=”microtext.min.js”></script> </head> […]

Parsing JSON in JavaScript PRO

There are many cases in which we need to parse JSON data our code receives. When writing our code in JavaScript parsing the JSON data is fairly simple. We just need to invoke the parse() function on the JSON object, as in the following code sample. The JSON object is available in most modern web […]

Hammer.js Jump Start PRO

The Hammer.js JavaScript library allows us to handle gesture touch events that take place when running our code on a touch screen device. The following code sample shows how simple it is to use this library. You just need to pass over the name of the gesture touch event you want to handle and the […]

The Decorator Design Pattern in JavaScript PRO

The decorator design pattern was created in order to allow us adding new functionality to an already existing class without extending it. The decorator design pattern was created for those cases in which we cannot extend the class. The following code sample shows a simple demo for implementing the decorator design pattern in JavaScript. <!DOCTYPE […]

The Factory Design Pattern in JavaScript PRO

The factory design pattern is a creational pattern. It assists us with creating new objects. Instead of using the new operator in order to create a new object we call the factory method and pass over arguments it uses to create the exact object we need. The following code is a small sample for implementing […]

Update cookies preferences