Posts about JavaScript

Avatar for vbabiy@howsthe.com

jQuery Object Oriented Event Handling

Published April 13, 2010 by Vitaly Babiy

Using jQuery, its easy to write event handlers for all kind of events that can occur in the DOM. It gets a little harder when the callback function is part of a object, and you want the function to have access to the object using this.

In jQuery you write a event handler as the following:

function clicked(event) {
    alert(this)
}
$("#element").bind('click', clicked)

The this variable is going to contain the element that triggered the event.

Tags
  • Event
  • Handlers
  • Javascript
  • JQuery
  • OOP
Avatar for charles.boyung@nexustechnologiesllc.com

jQuery Twitter Library

Published April 7, 2010 by Charles Boyung

The world of jQuery is kind of like the iPhone app store. Just like “there’s an app for that”, if you want to do something specific with jQuery, there’s probably a plugin for it. And just like the iPhone app store, the quality of the items you find can vary from utter garbage to brilliant masterpieces. The jQuery Twitter library known as jTwitter falls somewhere in the middle. It has some decent functionality, and can definitely prove useful if you aren’t able to make use of any of the more robust options out there (such as any of the server-side libraries or the API itself).

What it Does
jTwitter does one thing: it allows you to retrieve and display recent Twitter posts for a specified Twitter user. The demo provided is a good starting point, but it only goes as far as showing you the basics of querying for posts and displaying the results. I’m going to take this a step further and show you how you can extend this with additional Javascript to make the results somewhat more useful. To better follow along with this tutorial, I recommend downloading the full tutorial source.

Avatar for vbabiy@howsthe.com

Crockford on Javascript

Published March 29, 2010 by Vitaly Babiy

Douglas Crockford is giving a public lecture on JavaScript, the link is below. Anyone that is interested in JavaScript or is using it (really any web developer) should watch them.

Douglas Crockford

Douglas is the author of one of my favorite book JavaScript: The Good Parts Amazon Link

http://www.yuiblog.com/crockford/

A blog about development, marketing, and design.

The next version of Ubuntu is coming soon