Tag Archives: JavaScript/jQuery

Evangelizing jQuery

Regular readers of this blog will know that I am great fan of jQuery. Recently I am thinking of evangelizing jQuery at work and convince people who take up decision to make jQuery as the default JavaScript framework to be used across the organization.

The following is the list of advantages/benefits which I have prepared so far. 

  • Light weight and has a very small footprint.
  • Browser abstraction – jQuery provides browser abstraction and is hightly optimized for each individual browser.
  • Excellent Plugin architecture – jQuery has an excellent Plugin architecture and you can find a jQuery Plugin for anything that you want to do.
  • Speed – When compared with other libraries, jQuery is much faster.
  • Less code == Less mistakes == better performance.
  • Active development community – It has a very active development community headed by John Resig
  • Backed by major organizations like Microsoft and Nokia. Microsoft had integrated it with the latest version of ASP.NET
  • Very small learning curve.
  • Chaining well suited for designers since it uses selectors based on CSS Selectors.
  • Excellent Documentation for all methods and selectors.
  • jQuery UI – Provides ready made themable GUI components.

Let me know if you could think of any addition to this list. Thanks 🙂

Posted in JavaScript/jQuery | Tagged , | 8 Comments

Notes for “DOM is a mess” by John Resig

I just finished viewing John Resig’s talk titled “DOM is a mess” at Yahoo. I took some notes while watching the video and I am posting them here, so that I can refer to them at a later point of time (It is easier to search when it is not on paper 🙂 ). Also it might help someone to get the outline of the talk before actually watching the video. The original video runs for more than an hour.

Also be warned that the following is my own interpretation of the video and I might have missed or could have interpreted some point differently. 🙂

About the speaker, John Resig

As you all know John Resig is the creator of the excellent jQuery library. He works for Mozilla corporation and you can get more information about him from his blog.

DOM is a mess

This is the first thing John Resig said about DOM methods after saying that DOM is a messy

Nearly every DOM method is broken in some way, in some browser.

The following are some of the bugs in the DOM methods

getElementByID ()

IE and Old versions of Opera return elements whose name == id

getElementByTagName ()

.length gets overwritten in IE if an element with an ID = “length” is found

getElementsByClassName ()

Opera doesn’t match a second specified class

querySelectorAll ()

Safari 3.2 can’t match uppercase characters in quirks mode.

So the moral is that almost every method in DOM is messed up.

Writing Cross-browser code

Find out the cost/benefit ratio for supporting a browser and then pick the browsers you are going to support before writing your code.

He talked about Yahoo’s graded support and jQuery browser Support.

Escaping from DOM’s mess

The following are some of the tips to escape from DOM’s mess.

  • Having a good test suite is not a facility but a requirement.
  • Don’t introduce global variables or extend native objects.
  • The order in which style sheets are included matters.
  • Don’t use browser sniffing, but use Object detection or feature simulation instead.
  • Don’t assume a browser will always have a bug. They might get fixed in a future release.
  • Gracefully degrade for old browsers
  • As your code matures, the number of assumptions should reduce.
  • While removing elements from DOM, clean it by unbinding the events


So my dear readers what you think about my notes. Also let me know if you like notes for videos in this format. If there is a demand, then I can post some of my notes on other videos which I have already viewed.

Posted in JavaScript/jQuery | Tagged , , , , , | 1 Comment

Useful jQuery links

I found a lot of useful links related to jQuery while researching for my presentation on jQuery. I thought of sharing them here so that it will be useful for others who are looking to get their feet wet with jQuery.

I am planning to constantly updated this post, so if you have any other links which might be useful do leave a comment and I will add them.




jQuery related slides

Some useful Plugins

jQuery Related Books

Posted in JavaScript/jQuery | Tagged , , | 4 Comments

getElementsByTagName and the sort order of the result array

I was just wondering how the result array of the getElementsByTagName function will be sorted. Will it be elements of the array be sorted in the order in which they appear in the document or is it completely random? And how does it behave in different browsers?

Can anyone shed more lights on this or provide me some pointers?

Self Note (by my evil twin): Sudar, you have become lazier these days. If you are not getting a response take the pain to test it across different browses by yourself!!

Posted in Web Programming | Tagged , , | 2 Comments

What is your Level of web knowledge?

Well I am going to flirt with an Internet Meme which is getting spread around. It all started when Emil wrote Levels of CSS knowledge. This inspired Roger to write Levels of HTML knowledge and that got followed by Levels of Javascript knowledge, the levels of Accessibility knowledge etc.

Instead of leaving a comment on each blog separately I decided to write about my level of knowledge here. So here it goes

Apart from letting you know where you are standing, these posts are really fun to read. So what is your Level of web Knowledge?

Posted in Web Programming | Tagged , , , , | Leave a comment

JavaScript Components

Check out yxScripts.com. Excellent ready to use java script components like Menu, calendar etc.. Really damn good.

Posted in JavaScript/jQuery | Tagged | Leave a comment

JavaScript Toolbox

JavaScript Toolbox – Reusable Libraries And Objects

This is a collection of Javascript source files, examples, and concepts. Use these instead of always re-inventing JavaScript solutions.

Posted in JavaScript/jQuery | Tagged , | Leave a comment