facebook-squared twitter-squared rss-squared gplus-squared

Wednesday

24

December 2014

0

COMMENTS

Why and When of jQuery

Written by on 24 December 2014

When to use jquery and when to ignore

Why jQuery

Let’s explain DOM as this term, will be used numerously for the rest of the article.

Essentially jQuery solved issues between DOM and JavaScript. When Html renders all the assets like html,images and CSS it creates a DOM tree and that we use JavaScript to traverse DOM tree or elements on the page.

When web was baby, JavaScript was just used with sapling of the DOM to manipulate with, but with the arise of different server side and client side, the DOM became complex. Different browsers implement DOM and JavaScript differently. So we’ve to write same code thrice to support all browser.

Back in the day, a smart developer was the one with ability to write code that is supportive to all browsers. One of the reason John Resig wrote jQuery is to cope with this exact problem.

When jQuery

It’s not a good idea to download a file of size of 82.3 kilo bytes just for one or two little jQuery features, one should go with core JavaScript. Here you can find all sort of Javascript alternative to jQuery tiny tiny features. JavaScript is a great time savour for larger website that use JavaScript extensively. It will not only help you write less, but this framework also take cares of all the browser inconsistencies. These disagreements will last between browsers, unless we have same rendering engine to parse the JavaScript

Leave a Reply

%d bloggers like this: