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 […]
Archive for the ‘JS tricks’ Category
IE7 error : SCRIPT1028: Expected identifier, string or number
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
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
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
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 […]