JavaScript

May 18, 2012 JavaScript no responses # , , , , ,

Social sharing buttons – Socialite.js

Socialite provides a very easy way to implement and activate a plethora of social sharing buttons — any time you wish. On document load, on article hover, on any event!

Continue reading

November 30, 2011 JavaScript , jQuery no responses # ,

jQuery: Setting cookies

Setting and clearing cookies with jQuery is really easy but it’s not included in the jQuery core and requires a plug-in. This post shows how to set, get the value of and clear cookies with jQuery.

Continue reading

November 25, 2011 JavaScript no responses # ,

Simple JavaScript API : Countdown JS

Countdown.js  – A simple JavaScript API for producing an accurate, intuitive description of the timespan between two Date instances.

The library calculates the value continuously considering “the time goes on” and keeps generating an accurate output. It can provide the timespan in many formats like milliseconds, seconds, minutes, hours, days, weeks and even millennias.

There are methods for displaying it as an English sentence like “3 years, 6 months, 21 days, 10 hours, and 32 minutes”.

The countdown can be reset easily and there are callbacks both on 

start

and 

end

.

Website: http://countdownjs.org/
Demo: http://countdownjs.org/demo.html

November 23, 2011 JavaScript , jQuery no responses # ,

Avoid double clicking with jQuery

There has been always one troubling issue regarding web forms and user interaction: when the user double clicks the submit button. Detecting and preventing it or disabling the button is an expensive operation in terms of computing. Fortunately, jQuery has a neat solution. As usual.

Enter one function. This function will simply unbind the click event from an object after it has been clicked. It is really that simple. All you need to pass to one() is the event that you want to bind/unbind and a handler function to execute when the event is triggered:
Continue reading

November 20, 2011 JavaScript , jQuery no responses #

How to check whether an element exists with jQuery

When we using jQuery (or any other JavaScript library for that matter), have you ever wondered how to test whether an element exists using a selector? Well, maybe you haven’t, but I have – lots of times – so I thought I’d share how it’s done here because it’s not as simple as it seems.
Continue reading

October 23, 2011 JavaScript no responses #

Leaflet – JS Library For Interactive Maps

Leaflet is a modern, lightweight BSD-licensed JavaScript library for making tile-based interactive maps for both desktop and mobile web browsers, developed by CloudMade to form the core of its next generation JavaScript API.

It is built from the ground up to work efficiently and smoothly on both platforms, utilizing cutting-edge technologies included in HTML5. Its top priorities are usability, performance, small size, A-grade browser support, flexibility and easy to use API. The OOP-based code of the library is designed to be modular, extensible and very easy to understand.
Continue reading

October 22, 2011 JavaScript no responses #

Awesome handling of keyboard events with JavaScript: jwerty

jwerty is a lightweight JavaScript library (1.5kb minified) that enables us to bind, fire and assert key combination strings against elements and events.

Library 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. jwerty is a small library, weighing in at around 1.5kb bytes minified and gzipped (~3kb minified). jwerty has no dependencies, but is compatible with jQuery, Zepto or Ender if you include those packages alongside it.
Continue reading

October 20, 2011 JavaScript no responses # , ,

Simple Javascript Delay routine

Setup events to occur after a delay

Using setTimeout we can trigger an alert after 5000 milliseconds.

setTimeout("alert('hello guest!')",5000);

Continue reading

1 2 3
Stay In Touch