jQuery

pie

jQuery is a very popular JavaScript library. Their slogan is “Write less. Do more.” This is very accurate. You need to download the jQuery library which is free from jquery.com and load it before using it eg <script src = “jquery.js”></script> where jquery.js refers to the location of your local copy or download it from the Google AJAX Libraries eg <script src = “http//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js” ></script>. Using a $ before a script command marks it as jQuery eg $( “button” ).html( “Next Step…” ) changes the button text to “Next Step…”.

Advantages of jQuery include very few lines of code, cross browser JavaScript compatibility, and easy access to AJAX which allows you to interact with the server without the need for page refreshes. The only real disadvantages to jQuery is he additional page weight and perhaps a slight decrement in speed. The current version jQuery 1.10.2 weighs in at 90 kb. jQuery probably runs a little slower than naked JavaScript but I am guessing that the difference is trivial for most purposes.

Overall, jQuery makes JavaScript easy as pie!

About Robert

Robert is a novice web site developer. A lack of professional training has not prevented him from creating some very nice websites for small businesses who would otherwise have gone without a web presence.

Subscribe

Subscribe to our e-mail newsletter to receive updates.

No comments yet.

Leave a Reply