davidwalsh.name
Submitted by: David Walsh

Creating a Custom “:selected” Pseudo Selector in MooTools

A while back I read a very interesting article by MooTools core developer Jan Kassens about how to create a custom pseudo selector in MooTools. I was surprised at the ease in which one can add their own pseudo selector that I thought I’d add a pseudo selector that I found useful in jQuery: “:selected.” This pseudo selector would return option elements that are selected. Here’s how I did it.

direct link