March 23rd, 2006 by Aaron N.
According to this post on the mir.aculou.us website, Justin Palmer has released event:Selectors, a “method to cleanly use CSS pseudo selectors to assign DOM events to elements on the page.”
The functionality, bearing resemblance to the behaviour.js library, hooks into all of the latest Prototype functionality and adds a few tricks of its own. They provide a code example of how this new functionality can be used:
var Rules = {
'#icons a:mouseover': function(element) {
var app = element.id;
new Effect.BlindDown(app + '-content',
{queue: 'end', duration: 0.2});
},'#icons a:mouseout': function(element) {
var app = element.id;
new Effect.BlindUp(app + '-content',
{queue: 'end', duration: 0.2});
}
}
Posted in Event Scripting, Prototype | Comments Off
March 16th, 2006 by markbult
Sorry about the non-annotated linkdump. Aaron’s always after me to post stuff here instead of emailing him links to new things I find, but I just don’t have time to describe all these sites. At least I categorized them… Read the rest of this entry »
Posted in 'Industry' News, 3rd Party Libraries, Code Snippets, Event Scripting, Examples, Manipulating the Dom, Prototype, Reference, Server-side Integration, Visual Effects | Comments Off
February 21st, 2006 by Aaron N.
Bill Graham was asking me about where to put javascript events today. window.onload? At the bottom of the html document? Attached to the onload event of an image somewhere in the page?
Here’s an article by Dean Edwards on an interesting solution that works for IE and Firefox.
For the life of me, I can’t find the article that I read a week or so ago on this topic that outlined numerous strategies on dealing with window.onload issues, but one option to consider is using event monitoring in prototype to monitor the browser for an element to be present before performing an action on it.
Posted in Browser Stuff, Event Scripting, Examples, Organizing Code, Reference | Comments Off
February 8th, 2006 by Aaron N.
-via Ajaxian (I know, I get a lot of ideas from this site!)
Ecytemedia has an article on how to use Events in Prototype. It dives into attaching functions to events using Event.observe along with some advanced javascript using anonymous functions and closures. Read the rest of this entry »
Posted in Event Scripting, Prototype | 2 Comments »