Archive for the ‘JS tricks’ Category

Box2D JS

Posted on: December 31st, 2012 by Sarath C No Comments

Box2DJS is a JavaScript port of the Box2D Physics Engine, and was created by Robert Kieffer. The original Box2D engine was designed as a 2D rigid body simulation library for games. Programmers are able to use it to make objects move in believable ways and make the world seem more interactive. Box2D is open source  with a strong community, numerous […]

IE7 error : SCRIPT1028: Expected identifier, string or number

Posted on: August 29th, 2012 by Sarath C 2 Comments

I just noticed today only, that the animated sliders in our home page is not loading in IE7 when I  logged in from my friends PC which was running in IE7.  Just did a casual visit to our website and found the sliders are not loading. I didn’t noticed it initially because most of our […]

Create a simple photogallery with jQuery in five minutes

Posted on: July 25th, 2012 by Sarath C 2 Comments

This is a simple tutorial which will help you to create a simple photo gallery system for your web project in less than five minutes using HTML, CSS, and JavaScript (jQuery). Following is the screenshot of the final product. Step 1: Load the jQuery library <script src=”http://code.jquery.com/jquery-1.7.2.min.js”></script> Step 2: The HTML Markup The most important […]

Lazy load images and save bandwidths of your website

Posted on: June 30th, 2012 by Sarath C No Comments

This tutorial will help you to load your website faster by implementing lazyloading for all the <img> tags. Most of the time server-side render time is probably not the bottleneck of your page performance… Usually its the, the front-end is the most significant contributor to page load time. Things like <img> tags and css images […]

Get URL parameters using jQuery

Posted on: June 27th, 2012 by Raez Mon 3 Comments

This simple code snippet will help you in troublesome times to get the query parameters from a URL with jquery / javascript. /** * Function to parse the URL queries */ function get_url_parmeters(url, name) { name = name.replace(/[[]/, “\[“).replace(/[]]/, “\]”); var regexS = “[\?&]” + name + “=([^&#]*)”; var regex = new RegExp(regexS); var results […]

Asynchronous loading of the tweet button

Posted on: May 24th, 2012 by Raez Mon No Comments

As part of optimization of our home site, we noticed that the tweet button is breaking the page draw flow. It was being loaded in a blocking way so it is slowing down the page. This will create more problems when twitter is down or too busy (which is what happening always!!) So we thought […]

Beautiful jQuery home page slideshow with translations

Posted on: January 21st, 2012 by Raez Mon 5 Comments

In this tutorial we will help you to build beautiful homepages with slideshows for your websites. This will let you to have a jQuery powered slideshow on the home page with random effects. We are using the famous Nivoslider plugin for this. The main thing we want to highlight is the lazyload image option integrating […]