All posts tagged “Javascript”

Enhance your site with with the ultimate guide to JavaScript

Read more about Enhance your site with with the ultimate guide to JavaScript at

The internet as we know it wouldn’t really work without JavaScript. Over its 20-year history, it’s grown from just a language for browsers to power some of the web’s most powerful frameworks and libraries, from AnglarJS to jQuery. This all-new handbook from the makers of net magazine rounds up everything you need to know about JavaScript. There’s 27 practical projects for you to get your teeth stuck into, and over four hours of exclusive tutorial videos.

Creative Bloq

8 JavaScript Libraries to Animate SVG

SVG is a resolution-independent graphic. That means it will look good on any type of screen without suffering any loss of quality. Beyond that, you can also makes SVG come alive with some animation effects.

In one of the post of our SVG series previously, we have shown you how SVG animation works with the <animate> element albeit at a low level. This time, we will share a couple of JavaScript libraries that help extends SVG animation to the next level.

More on

1. Vivus

Vivus is a JavaScript library that gives your SVG the appearance of being drawn. Vivus works out of the box without a need for any dependencies (e.g. jQuery). Simply include the .js file in your HTML, and designate the SVG element you want to animate, along with some preset options to start the animation right away.

For example:

 new Vivus( 'svg-element', { type: 'oneByOne', duration: 200 }); 

The above will animate my SVG element that has the svg-element ID in 200 millisecond. Each element of this SVG will be drawn one after the other within that time-frame.

2. Bonsai

Bonsai is a powerful JavaScript library that allows you to draw, morph as well as animate graphical elements on web pages. It supports both HTML5 graphic type Canvas and SVG. With Bonsai, you can build a simple rectangle or a circle or if you like, a full-fledged multiplayer animated game like this one. You can use Orbit to feel how Bonsai works in live action or check out a couple of these impressive examples to draw inspiration from.

3. Velocity

Velocity is a JavaScript library built for fast animations. Velocity’s speed when rendering animation is incredibly fast. It outperforms jQuery, and even CSS, in comparison. Velocity’s API works similar to the animation in jQuery except it uses the keyword alias $ .velocity() instead of $ .animate(). That aside, you can use the exact same animation keywords such as fadeIn and fadeOut.

4. Raphael

RaphaelJS is a library that allows you to draw as well as animate vector graphic SVG on web pages. It supports a wide range of browsers all the way down to IE6, which pretty much makes Raphael the most dependable JavaScript library in the niche. With RaphaelJS, you can build interactive analytic charts, world maps, and game interactions akin to that of Counter Strike.

5. Snap

SnapSVG is another popular JavaScript library for SVG animation developed by Raphael developer, Dmitry Baranovskiy, along with the Adobe Web Platform Team from the ground up. Unlike Raphael though, SnapSVG is meant for only the latest browsers. That allows the library to be significantly smaller than Raphael and to support SVG features like clipping and masking.

6. Lazy Line Painter

Lazy Line Painter is a jQuery plugin for animating SVG paths to animate the drawing sequence, similar to Vivus. The bad news is this plugin only does this very specific thing. Hence, when you import SVG from apps like Illustrator or Inkscape, ensure that there is no Fill color left on your SVG, just the paths.

7. SVG.js

SVG.js is a lightweight library for manipulating and animating SVG. With this library, you’ll be able to animate the size, position or color within your SVG element. It not only animates though; you can also apply additional plugins to add extra functionalities. This example uses the svg.filter.js plugin to apply filters like gaussian blur, desaturate, contrast, sepia etc. to the image.

8. Walkway

Walkway supports three type of elements, path, line, and polyline used to draw SVG lines. Here is an example from Polygon that shows the PlayStation 4 console line animation.

14 Tools For Minifying Javascript

Javascript minification is a technique which condenses your script into a much smaller footprint. You lose human readability but you conserve considerable bandwidth – in the end, Javascript is meant for your browser not for your users.

Most production websites use Javascript minification but the way this is achieved varies greatly. From simple online converters to more comprehensive GUI tools to command line interfaces, our options are pretty varied. In this article we’ll take a look at how Javascript minification works, how we can build it into our workflow and what the pros and cons of minifying are.

How Minification Works

The best way to learn what happens when you minify your code is to take a look at the UglifyJS Github Repository. This script is used in many online converters as well as GUI tools and command line tools like Grunt. Here are some of the transformations it applies to make your code shorter:

  • Removes unnecessary space
  • Shortens variable names, usually to single characters
  • Joins consecutive var declarations
  • Converts arrays to objects where possible
  • Optimizes if statements
  • Calculates simple constant expressions
  • etc.

As a quick example, here’s a function that essentially writes some given text out.

 function hello( text ) { document.write( text ); } 
hello( 'Welcome to the article' );

Let’s see what happens when we minify this. Note the removal of spaces and indentation and the shortening of the text variable.

function hello(e){document.write(e)}hello("Welcome to the article")

Javascript Minification Tools

The tools used for minifying Javascript can be broadly categorized into 3 groups: online tools, GUI tools and command line tools.

  • With online tools it is usually a matter of pasting your code and copying the result immediately.
  • GUI tools often contain a lot more functionality; JS minification is just a small part of what they do.
  • Command line tools are also usually more comprehensive, offering minification as a module.

Online Tools

The great thing about online tools is the speed with which you can work with them. Complex GUI and command line tools minify quicker but you need to have a project set up for it to work properly. The downside to these tools are that they mostly provide little to no customization, at least when compared to command line tools.

GUI Tools

  • Koala is a free tool for LESS, SASS compilation, JS minification and a lot more
  • Prepros is a cross-platform paid app which gives you even more options
  • Codekit is my app of choice. It is a paid Mac-only app that offers code compilation, minification, a preview server, bower package management, and a lot more
  • AjaxminGui is a free, single-purpose Windows tool for minifying your JS
  • UltraMinifier is a free app for OS X which minifies CSS and JS with drag and drop
  • Smaller is an OS X tool which minifies and concatenates files for you

I’ve mentioned two types of GUI apps here. The simple one-step minification apps are much like their online counterparts. They are extremely quick to use since you can just drag-and-drop files into them, no setup required. That said, they provide virtually no customization.

Larger GUI tools (Prepros, Koala, Codekit) are great at managing projects and giving you a bit more options for compression but they do need a little bit of setup. A quick JS minification would take about 20 seconds of setup which is a lot, compared to the 2 second process of online or simple GUI tools.

One the other hand, they offer you more features in general and provide you with automation. Your JS files will be minified each time you save them, no need to manually minify them. If you’re developing something in Javascript this is definitely the way to go.

Command Line Tools

  • Minify is for those who want to minify JS from the command line but don’t want to set up anything fancy in Grunt or Gulp
  • Uglify.js which we’ve mentioned before is also available as a stand-alone command line tool
  • Grunt has an extension for Javascript minification named grunt-contrib-uglify
  • Gulp also has JS minification using Uglify.js through gulp-uglify

Command line tools are not just for Linux geeks! I’m not great at the terminal but setting up things like Grunt and Gulp is easy through their great documentation. The upside of command line tools is the awesome amount of flexibility you have from options to output.

On the other hand, there is a bit of a learning curve. Getting used to the command line takes some (not a lot of) practice which you will find restrictive before you start enjoying the benefits.


If you’re new to web development, I would recommend one of the first three GUI tools. They will help you manage your projects in general and offer much more than just JS minification.

If you’re a seasoned pro you should probably look into Grunt or Gulp as these offer the most control over automation tasks. If you need to minify a script quickly without setting up a project, the command line tools can save you a lot of time.

Each group of tools have their pros and cons and in truth you will probably end up using one of each at some point or another. Keep in mind that when in a production environment you should always minify your Javascript and CSS!

Create interactive JavaScript video effects

Read more about Create interactive JavaScript video effects at

Modern web users have embraced video, but developers often find video integration problematic owing to cross-device/platform limitations (most mobile browsers do not support autoplay for inline video) and fewer opportunities to infuse playback with user interactivity. With some fairly simple methods, you can replicate video-like effects without needing to transcode large files or fight autoplay restrictions on mobile devices.

Creative Bloq

40 Best JavaScript Libraries And jQuery Plugins

With this collection, we are showcasing a useful assortment of some free JavaScript libraries and jQuery plugins for you so that you can download them and simplify your work process. JavaScript is very useful in solving problems and issues that come during the development process. JS is meant to simplify your work process and with the help of JS libraries you can easily make your job very much easier for you.

Here, we are presenting for you 40 most useful JavaScript libraries and jQuery plugins that could be the right solutions for your current problems. We hope that this round up will help you find some plugins that you could use in your next project. Enjoy!

Famous is a JavaScript framework for everyone who wants to build beautiful experiences on any device.


Ember.js is a JavaScript framework that does all of the heavy lifting that you’d normally have to do by hand. There are tasks that are common to every web app; Ember.js does those things for you, so you can focus on building killer features and UI.


Declarative handling library for CSS animations. The main objective is to provide an eloquent, easy to translate, and quick to develop environment.


Trianglify is a javascript library for generating colorful triangle meshes that can be used as SVG images and CSS backgrounds.


Gillie is a lightweight MVC framework inspired in Backbone. It provides useful methods to perform RESTful HTTP requests and allows for a separation of concerns using models, views and handlers.


Ace is an embeddable code editor written in JavaScript. It matches the features and performance of native editors such as Sublime, Vim and TextMate.


A cross-device, cross-platform client framework written in JavaScript and designed to make building Single Page Applications (SPAs) easy to create and maintain.


SkelJS is a lightweight frontend framework for building responsive sites and apps.

Intense Images

A simple library to view large images up close using simple mouse interaction, and the full screen.



A javascript library for multi-touch gestures.


The odyssey.js library is being developed to help journalists, bloggers, and other people on the web publish stories that combine narratives with maps and map interactions.


Bounce.js is a tool and JS library that lets you create beautiful CSS3 powered animations. Give it a spin.


Shepherd is a javascript library for guiding users through your app. It uses Tether, another open source library, to position all of its steps.


A general purpose, real-time visualization library.


Boba.js is a small, easily extensible JavaScript library that makes working with Google Analytics easier. It supports the old ga.js library as well as the new analytics.js library. It has one out of the box function, trackLinks, and makes tracking everything else child’s play. Requires jQuery.


Screen recording and capturing with pure client-side JavaScript.


Javascript library for create simple landing page with bing wallpaper’s API.


Forio Contour provides a core set of common visualizations that you can see in the gallery, and it’s easy to extend if you want to add your own customizations. Plus, it’s free and open source.


AngularJS lets you write client-side web applications as if you had a smarter browser. It lets you use good old HTML (or HAML, Jade and friends!) as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly.



A JavaScript visualization library for HTML and SVG.



Bower offers a generic, unopinionated solution to the problem of front-end package management, while exposing the package dependency model via an API that can be consumed by a more opinionated build stack.


Handlebars provides the power necessary to let you build semantic templates effectively with no frustration.


Video.js is a web video player built from the ground up for an HTML5 world. It supports HTML5 and Flash video, as well as YouTube and Vimeo (through plugins).


JavaScript form validation, without actually writing a single line of JavaScript!


Dropzone is an easy to use drag’n’drop library. It supports image previews and shows nice progress bars.


A flexible JavaScript library that provides a strong foundation for building robust typeaheads.


A better way for new feature introduction and step-by-step users guide for your website and project.


Stand-alone parallax scrolling library for mobile (Android + iOS) and desktop. No jQuery. Just plain JavaScript (and some love).


Knockout is a JavaScript MVVM (a modern variant of MVC) library that makes it easier to create rich, desktop-like user interfaces with JavaScript and HTML.

Magnific Popup

Light and responsive lightbox script with focus on performance.


A service for your website that makes it surprisingly easy to collaborate in real-time.


The Swiss Army Knife of Vector Graphics Scripting – Scriptographer ported to JavaScript and the browser, using HTML5 Canvas.


Flot is a pure JavaScript plotting library for jQuery, with a focus on simple usage, attractive looks and interactive features.


Fabric.js is a framework that makes it easy to work with HTML5 canvas element. It is an interactive object model on top of canvas element. It is also an SVG-to-canvas parser.



Beautifully crafted timelines that are easy and intuitive to use.


KineticJS is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.

A simpler way to create JavaScript

Read more about A simpler way to create JavaScript at

Processing is a brilliant programming language aimed at more at artists and designers than at coders. Designed to help non-programmers get started with programming, makes it easy for get instant visual results from your code. It’s possible to run Processing programs in a browser using Processing.js, but now there’s an alternative in the form of p5.js.

Creative Bloq

9 Free jQuery JavaScript Shopping Carts

Shopping cart is the most important and most crucial element of any eCommerce website. Shopping cart is something that allows online users to add different items that they wish to buy to the cart so that they can be billed accordingly. Shopping cart is mandatory because without a shopping cart, you cannot purchase anything on the internet.
In this compilation, we are presenting 9 free as well as premium jQuery JavaScript shopping cart to make your work easier. These jQuery javaScript shopping carts are one of the most light weight shopping carts and easy to integrate on any HTML or WordPress based website. Here is the list. Enjoy!

Smart Cart

Smart Cart is a flexible and feature rich jQuery plug-in for shopping cart. It makes the add-to-cart section of online shopping much easy and user friendly. It is compact in design, very easy to implement and only minimal HTML required.


Add an Ajax shopping cart to your website with optional PayPal checkout.Built with jQuery PHP, jCart is open source software free to use on any site.


The minicart is a great way to improve your PayPal shopping cart integration. One simple change and your users will be able to manage their shopping cart directly from your website.

Product Colorizer jQuery Plugin

productColorizer is a light-weight solution for users to quickly preview a product in different colors. The plugin uses only two images per product to create the effect and it is built on top of the robust and popular Javascript framework jQuery, providing you with an easy setup.

Ajax Paypal Cart Jquery Plugin

AJAX PayPal Cart is a easy to use JQuery plugin for web developer to add a full function shopping cart in their website.

An AJAX Based Shopping Cart with PHP, CSS & jQuery

In this tutorial we are going to create an AJAX-driven shopping cart. All the products are going to be stored in a MySQL database, with PHP showing and processing the data.

Super Shopping Cart with JQuery

Building a drag-drop shopping cart

In this tutorial, we will show you how to build a shopping cart page which enables users to drag and drop the products they wish to buy.

How To Create A Simple Multi-Item Slider

A tutorial on how to create a simple category slider with a minimal design using CSS animations and jQuery.

How to Code a Fixed Auto-Hiding Nav Bar with JavaScript

Let’s start this week from something really interesting. Today we’d like to offer you a tutorial that will teach you how to create an auto-hiding navigation bar powered with JS.

42 top examples of JavaScript

Read more about 42 top examples of JavaScript at

JavaScript creates platforms that can engage a user and ensure that they remember your site and continue to revisit. It can be used to create games, APIs, scrolling abilities and much more.

Creative Bloq

10 JavaScript Libraries To Handle Keyboard Events

If you are looking for some JavaScript Libraries that can handle keyboard events, then you are at right place. Here we are featuring 10 best JavaScript Libraries that can handle keyboard events very well. With these libraries, developers can complete their tasks easily. It is important to incorporate event handlers to your HTML documents and register functions via JavaScript. This way, you can make your web applications to act similarly to a desktop application.

Here is the complete collection of 10 useful JavaScript libraries that can be very helpful for you. We hope that this collection proves to be the best for you. Enjoy looking into this collection and have more fun in using them for your works. Enjoy!


Keypress is an input capture library with some very special features, it is easy to pick up and use, has a reasonable footprint (~9kb), and has no dependencies.


Mousetrap is a standalone library with no external dependencies. It weighs in at around 1.9kb minified and gzipped and 3.5kb minified.

jQuery Hotkeys

jQuery Hotkeys lets you watch for keyboard events anywhere in your code supporting almost any key combination.


Keymage is a small library for handling key bindings in JavaScript.


A JavaScript library for binding keyboard combos without the pain of key codes and key combo conflicts. It can be used as both a standalone library or an AMD module.


Keymaster is a simple micro-library for defining and dispatching keyboard shortcuts in web applications.


Jwerty is a JS lib which allows you to bind, fire and assert key combination strings against elements and events. It normalises the poor std api into something easy to use and clear.


Kibo is a simple JavaScript library for handling keyboard events.


This is a library for normalizing JavaScript key codes across browsers.

JavaScript Shortcuts Library