By Ryan on February 25, 2010
On a recent project, I used ajax to render a full cell of a table upon clicking it. I found that without some kind of queue, my clients would click on a bunch to expand them, but only the first would render. Mootools offers a plugin in mootools more called Request.Queue, but that wasn’t what [...]
Posted in Mootools | Tagged ajax, chain, link, Mootools, queue, request
By Ryan on January 13, 2010
I was adding some much needed events to my GoodCarousel plugin for MooTools recently. I added what I thought others might need,
startUp, beforeSlide, afterSlide, end, startOver, mouseEnter, mouseLeave
But since I’m lazy, I didn’t want to explicitly write a function for each of those events and then put them in options argument. I’m just too lazy. [...]
Posted in Mootools | Tagged events, Mootools, testing
By Ryan on January 7, 2010
Sometimes you don’t want to replace an element with another one, you just want a placeholder, so you can put it back later. I wrote takeOut and putBack to help out with that.
Element.implement({
takeOut: function(elementType) {
var elementType = ($type(elementType) == "string" ?
[...]
Posted in Mootools | Tagged element, implement, Mootools, putBack, takeOut
By Ryan on October 24, 2009
Hey there. I’m trying to get this plugin into the Mootools Forge but I’ve been having a hard time getting it to work. So in the mean time, checkout the repository on github.
GoodCarousel is a plugin made with Mootools 1.2.3. It is made to slide over to, not fade to, the next slide and uses [...]
Posted in Javascript, Mootools | Tagged goodcarousel, Javascript, Mootools, plugin
By Ryan on September 4, 2009
The mooWalkthrough has been around for a couple years now. I know that people read it but I don’t see or hear much feedback such as likes and dislikes about the content, pacing, structure and so on.
Every school year I take a couple weeks and rewrite some of it. Last last year I bit [...]
Posted in Mootools | Tagged Mootools, mooWalkthrough
By Ryan on August 26, 2009
GoodCorners is a tiny Mootools plugin that can apply the CSS3 border-radius to elements using a unified syntax so you can have beautiful rounded corners.
Usage
GoodCorners can be used in a couple different ways. Both parameters are optional. Omitting both will automatically round any elements with the gc class already on them. If you don’t supply [...]
Posted in Javascript, Mootools | Tagged good corners, Mootools, round corners, rounded edges
By Ryan on July 15, 2009
Mootools doesn’t offer a native way to randomize an array but it does offer a way to get a single random element from an array.
You can extend Mootools to have an Array.randomize method. It’s really easy to do.
Array.implement({
randomize: function() {
return this.sort(function() {return 0.5 – Math.random();});
}
});
Now you can easily call randomize on an array and you’ll [...]
Posted in Mootools | Tagged array, Mootools, randomize
By Ryan on February 18, 2009
Can you believe I left this post alone without a link to the mooWalkthrough? The 1.2.x edition is out right now waiting for you to read it. It’s practically begging you.
I’ve been working on the next version of the mooWalkthrough, 1.2.x. It works with the 1.2.x version of Mootools.
I wrote it this time to be [...]
Posted in Mootools | Tagged 1.2.1, 1.2.x, Mootools, mooWalkthrough
By Ryan on January 20, 2009
Tyler left a comment on one of my early blog posts, Mootools is not dead. His comment follows:
What would you say about this now? I agree with the subtext suggested by the authors of your excerpted posts. There has been an undercurrent in the MooTools-o-sphere for more than a year now: that developers’ insolence leaves [...]
Posted in Mootools | Tagged disconnection, Mootools, solution, state
By Ryan on January 15, 2009
I’ve always wanted something shorter than the addEvent-domready method for attaching functions to DomReady. I finally got around to writing a shortcut for it tonight and it’s pretty simple.
I call it window.ready. It’s about seven lines long, but if you think about it, it’s small. I don’t think there is even a point to having [...]
Posted in Mootools, Tips | Tagged domready, Mootools, shortcut