Using javascript + jquery


Anyone who dabbles in web design these days should really know how to code in xhtml, css and javascript. But this can be a daunting task for newbies to web design. Thankfully, there is no shortage of tutorials to teach you neat tricks, tips and techniques for building interactivity! The most sophisticated code to achieve this is javascript.

What is JavaScript?

JavaScript is a scripting language used to add interactivity and functionality to websites (and it’s not Java!)
JavaScript was first developed by Netscape in 1995 to improve the Netscape browser. It gained in popularity and wide-spread use and is essential to interactive design today!

JavaScript is used for:

  • adding interactivity to elements
  • creating dynamic menus
  • opening new browser windows
  • updating data within a browser
  • form validation (client-side)
  • manipulating the behaviour and properties of elements
  • creating alerts or warnings

… and lots of fun stuff!

Since HTML pages are mostly static, with JavaScript –changes occur on the ‘client-side’ (end-user) so that the page doesn’t need to be refreshed in the browser to ‘work’.

But writing JavaScript is a long and arduous process, so to make things simpler for designers, jquery came along with their motto, ‘write less, do more’. jquery is a library of code (also known as a framework) that web designers can simply download, copy and paste into their HTML pages. The only necessary changes  are edits to tell the framework which changes to control. The framework does the rest. BUT, you should still know a thing or two about javascript to understand how it works and what the framework is doing, in case you encounter glitches.

Other popular javascript libraries include: prototype, mootools and Adobe’s Spry. All of these sites have great tutorials on how to use their code.

However, I recommend learning the basics of javascript, and get a handle on the syntax and structure. Then, use the framework to enhance your site for more robust experiences but note that not all browsers treat javascript in the same way. It’s important to design for when javascript support is either absent or disabled, and to have a strategy for providing alternative content. This technique is called ‘progressive enhancement’.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: