Garrick Cheung

Sharing what I know and learn about CSS, MooTools, Javascript, PHP and etc.

JavaScript Jabber Interview: MooTools with Valerio Proietti and Arian Stolwijk

Posted on | March 1, 2013 | 2 Comments

Valerio (MooTools Founder) and Arian (MooTools Core Dev.) were interviewed for the JavaScript Jabber Show! Definitely a must listen. Read more

MooTools Elements Garbage Collection Gotchas

Posted on | January 23, 2013 | 2 Comments

MooTools handles a lot of the garbage collection with elements. While Element.destroy handles some garbage collection, it’s not obvious where else garbage collection occurs. Let’s clear some of this up. Read more

How to Use MooTools Element Methods in an iFrame Element

Posted on | October 31, 2012 | 2 Comments

Ever create an iFrame and wanted to use MooTools Elements methods in them, but you couldn’t? One solution is to add a <script>¬†element whose src attribute points to a MooTools JavaScript file. Instead of doing that, you could just use the MooTools that is loaded in the parent page! Read more

Dedupe an Array with MooTools

Posted on | August 20, 2012 | 2 Comments

shanebo asked on IRC today:

twhat is ze cleanest way to remove duplicate items from an array

I wrote a few solutions until I got what I think is a fairly quick and short snippet to remove duplicate items in an array. It’s really basic. There are probably a few cases this doesn’t cover.. such as objects with different ordered items but containing the same contents. I also didn’t test these solutions for their performance. Read more

Undo a commit in git

Posted on | August 15, 2012 | 1 Comment

I’ve been using git for a while now. And I’ve happend upon a pattern: I commit, and then have to undo my commit because I either missed a file or a change that should go with the commit.

So, how do you undo a commit in git..? Read more

Sorry, I’ve Been Lazy

Posted on | August 14, 2012 | 1 Comment

If you’re reading this, then I really appreciate that you’ve stuck around. I’ve been a little lazy, you see. I haven’t posted in a long while, obviously. This and that happened and then I just lacked the motivation to post.

But hey, something happened and I’m back in the game. :D

A little update: I’m now employed at Fitbit Inc. I left in March 2012. What made me do it? Lots of changes were going on that triggered my curiosity about the world beyond.

Things that haven’t changed: I’m still passionate about MooTools.

Anyways, I’ve got a few things to share. So I’ll start with this much. Stay tuned, if you’d like. :)


Posted on | June 13, 2012 | 1 Comment

Here’s a little cool snippet I picked up from MDN. It’s how to implement the method in browsers that don’t currently support it. The method returns a number value in milliseconds from 1 January 1970 00:00:00 UTC till now.

if (! { = function now() {
    return +(new Date);

MooTools Core Has Your (Element.NativeEvents) Back

Posted on | February 17, 2012 | 1 Comment

While scanning through MooTools-Core code the other day, I came across Element.NativeEvents and forgot what the value in each property meant. I remember asking MooTools-Core devs about it probably three to four times. You may be wondering “What’s the point?” Well, let me tell you. Read more

MooTools Core 1.3.2 and More

Posted on | April 29, 2011 | No Comments

MooTools just released an update to their Core and More libs. They are mostly fixes but More also comes with a brand new and shiny new Utility class called Tables!

Changes (and I quote!) to Core

  • Fixed Slick bug with ~div-like selectors
  • Fixed MooTools in the Node.js environment
  • Fixed an exception in DOMReady in Chrome when the page with MooTools was in an IFrame
  • Fixed setOpacity for very small numbers in IE
  • Fixed an exception in FireFox 4 when MooTools tried to overwrite document.head
  • Added the possibility to create elements with boolean values with an selector, e.g. new Element(‘input[checked]‘);

Changes to More (that I also quote):

  • Rewritten Element.Position which solved some issues
  • Added Table, as described above
  • Ironed out some Event Delegation issues
  • Additional fixes can be found at the Lighthouse for

Yay, MooTools developers! You guys are seriously stepping up with a quicker release. In the words of my friend David Walsh: MooTools FTW!

MooTools Core 1.3.1 and More

Posted on | March 3, 2011 | No Comments

A post long overdue.. but that’s besides the point. The MooTools Dev team released MooTools Core 1.3.1 and More!

Changes (and I quote!)

  • Lots (and by that I mean LOTS) of documentation improvements, clarifications and cleanups
  • Updated Slick to 1.1.5 and improved the speed of our Slick selector engine
  • Added delegation support for submit, focus, blur, reset, change and select events in MooTools More
  • If available the native JSON methods are now used in JSON.decode and JSON.encode
  • Multiple Pseudos click:relay(a):once (demo)
  • Two new pseudo events: :throttle and :pause
  • Added String.truncate to String.Extras in More
  • More than two hundred changes to increase the stability of both Core & More

MooTools Dev, you’ve been quite awesome. Keep up the great work!

keep looking »


    Hello and welcome. My name is Garrick. This blog is focused on web development that I learn and know and stuff. Who doesn't like stuff?!

    Subscribe to my feed



taking viagra woman Cheap Viagra
cheap gerneric viagra?