$$() and CSS SelectorsMost JavaScript libraries provide some form of the $() function. This function is a short hand version of document.getElementById(). However, I was only recently introduced to the $$() function in Prototype. $$() takes a list of CSS selectors and returns an array of objects that match. This ends up being a much easier and more maintainable way to access elements in the DOM than giving EVERYTHING an id. Although the scope of CSS selectors in general is way to large for this tutorial, we will walk thru a simple use of the $$() function in prototype and introduce you to CSS selectors.
More
Want lightbox functionality but don't want to add yet another javascript library to your project? Prototype and script.aculo.us are probably two javascript libraries you already have in your project. Here we will cover a lightweight way to implement lightbox functionality without adding yet another javascript library.
More
| About MichaelMinella.com |
|
|
|
|