Jump to Navigation

Javascript Made Easy

Printer-friendly versionSend to friendPDF version
September 11, 2010

Most, if not all developers who read this have at least heard of jQuery, one of the most powerful Javascript libraries out there. Most notably, there are a seemingly infinite number of "plugins" or "packages" that can be downloaded and implemented with almost zero knowledge of coding.

As tempting as it may be to simply use a package deal, a little bit of jQuery knowledge can go a long way. Note that as a Javascript library jQuery isn't really a different language, it's an extension of Javascript that allows you to do essentially the same tasks with significantly less code.

Let's start with a simple example for the first entry on this subject.

<script type="text/javascript">
$(document).ready(function() {
     $("#element").click(function() {
          $(this).css('color', 'red');
<div id="element">Click me</div>

The above code tells javascript to find the element that has an ID value of "element". When it senses that the user has clicked on it, it performs a simple CSS change and makes the text red.

Click me



Wow that really is easy. I can do some neat stuff without a lot of work.

Post new comment

The content of this field is kept private and will not be shown publicly.