jQuery .on() and .off () Methods

New Event API

The new .on() and .off() methods provides ways of attaching and removing event handlers to the currently selected set of elements in the jQuery object. $(el).on () gives the developers an unified way of binding events for any event types, direct and delegated events. It also allows you to bind more than one events at the same time by passing an object .

Syntax:
$(elements).on(events [, selector] [, data] , handler);
$(elements).off([ events ] [, selector] [, handler]);

// An example of binding a click event in before version 1.7 and version 1.7 is illustrated below:
$(“a#vikas”).click(Handler); // Click event before jQuery 1.7
$(“a#vikas”).bind(“click”, Handler); // Binding click event before jQuery 1.7
$(“a#vikas”).on(“click”, Handler); // Click event in jQuery 1.7

// Similar example for .delegate() and .undelegate() methods is shown below:
$(‘.container’).delegate(‘a.vikas, ‘click’, Handler);
$(‘.container’).undelegate(‘a.vikas, ‘click’, Handler);

//Above code can be replaced by the following code in the version 1.7
$(‘.container’).on(‘click’, ‘a.vikas, Handler);
$(‘.container’).off(‘click’, ‘a.vikas, Handler);

Reference:
http://api.jquery.com/on
http://api.jquery.com/off

HTML5 Reset Stylesheet

html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
margin:0;
padding:0;
border:0;
outline:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}

body {
line-height:1;
}

article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section {
display:block;
}

nav ul {
list-style:none;
}

blockquote, q {
quotes:none;
}

blockquote:before, blockquote:after,
q:before, q:after {
content:”;
content:none;
}

a {
margin:0;
padding:0;
font-size:100%;
vertical-align:baseline;
background:transparent;
}

/* change colours to suit your needs */
ins {
background-color:#ff9;
color:#000;
text-decoration:none;
}

/* change colours to suit your needs */
mark {
background-color:#ff9;
color:#000;
font-style:italic;
font-weight:bold;
}

del {
text-decoration: line-through;
}

abbr[title], dfn[title] {
border-bottom:1px dotted;
cursor:help;
}

table {
border-collapse:collapse;
border-spacing:0;
}

/* change border colour to suit your needs */
hr {
display:block;
height:1px;
border:0;
border-top:1px solid #cccccc;
margin:1em 0;
padding:0;
}

input, select {
vertical-align:middle;
}

Reference: http://code.google.com/p/html5resetcss/downloads/list

How to add icons using CSS Attribute Selector?

CSS Attribute Selector
CSS Attribute selectors are very powerful giving you many options to control styles of different elements e.g. you can add an icon based on the href attribute of the a tag to let the user know whether link points to an image, pdf, doc file etc.

Supported Browsers
IE7/IE8/IE9/Mozilla/Safari/Opera/Chrome.

CSS Code
a[href$=’doc’]
{
padding:5px 0 5px 30px;
background:url(doc_icon.png) no-repeat left center;
font:normal 14px arial;
line-height:32px;
}

HTML Code
<a href=”example.doc”>Doc File</a>

Tu Na Jaane Aas Pass Hai Khuda: Really A Beautiful Song

Song: Tu na jaane aas paas hai Khuda
Movie: Anjaana Anjani
Singer: Rahat Fatah Ali Khan

Lyrics
Dhundhla jaayein jo manzilein
Ik pal ko tu nazar jhuka
Jhuk jaaye sar jahan wahi
Milta hai rab ka raasta
Teri kismat tu badal de
Rakh himmat bus chal de
Tere saathi mere kadmon ke hain nishaan
Tu na jaane aas pass hai khuda
tu na jaane aas paas hai khuda

Tu na jaane aas pass hai khuda
tu na jaane aas paas hai khuda

Khud pe daal tu nazar
Haalaton se haar kar
Kahan chala re
Haath ki lakeer ko
Modhta marodta
Hai hausla re
Toh khud tere khwabon ke rang mein
Tu apne jahan ko bhi rang de
Ke chalta hoon mein tere sang mein
Ho shaam bhi toh kya
Jab hoga andhera
Tab paayega dar mera
Uss dar pe phir hogi teri subah

Tu na jaane aas pass hai khuda
Tu na jaane aas pass hai khuda

Tu na jaane aas pass hai khuda
Tu na jaane aas pass hai khuda
Mitt jaate hain sabke nishaan
Bas ek woh mitt ta nahin hai haye
Maan le jo har mushkil ko marzi meri haye
Ho humsafar na tera jab koi
Tu ho jahan rahunga mein wahi
Tujhse kabhi na ik pal bhi mein judaa
Tu na jaane aas pass hai khuda

Happy Diwali !!

Happy Diwali

May This Diwali be as bright as ever.

May this Diwali bring joy, health and wealth to you.

May the festival of lights brighten up

you and your near and dear ones lives.

May this Diwali bring in u the most brightest and

choicest happiness and love you have ever Wished for.

May this Diwali bring you the utmost in peace and prosperity.

May lights triumph over darkness.

May peace transcend the earth.

May the spirit of light illuminate the world.

May the light that we celebrate at Diwali

show us the way and lead us together

on the path of peace and social harmony

“WISH U A VERY HAPPY DIWALI”