Delayed Image Preloading Using Mootools
It’s almost three months ago since my last post! I’m quite busy at the moment. That’s why I’ll just write a quickie on delayed image preloading using Mootools (1.2.1, also might work with 1.2 and 1.1).
It’s almost three months ago since my last post! I’m quite busy at the moment. That’s why I’ll just write a quickie on delayed image preloading using Mootools (1.2.1, also might work with 1.2 and 1.1).
I tested a few looping techniques in the past, but I found a benchmark page which shows over 40 looping techniques and their running times. You can find the benchmark over here.
Yesterday I was playing around with the Google AJAX Feed API. With the API, you can download any public Atom or RSS feed using only javascript. By mixing the Google AJAX Feed API with MooTools 1.2, I wrote a tiny feed reader application in 30 lines of javascript goodness.
In this post I’ll present a way to send javascript functions over JSON from a php server (but it should work on other platforms too). Since PHP version 5.20 PHP includes the functions json_encode() and json_decode(). These functions encode values into JSON formatting and decode JSON formatted strings into associative arrays. The json_encode() function is not able to encode a value into a (javascript) function. This is a common issue when configuring graphs from Flotr (my Javascript plotting library) with JSON data. Here are my findings.
I wrote a pretty useless puzzle game that makes use of Mootools. I was updating the ‘about’ page on this blog, and I was looking for an original way to show a picture of myself. So take a look at the the about page and play around with it.
I’ve updated my previous post Mootools CSS Styled Scrollbar. I’ve added instructions about how to make it work with Mootools version 1.11. Also the example is updated. On the Mootools forums someone called ‘horseweapon’ wrote a simple function that used my code to make scrollbars. I used his function to work with the example. You can see the updated example over here.
I wrote a small piece of javascript that creates a css styled scrollbar from the Mootools (version 1.2b2) Slider class. I know there is a scrollbar class for Mootools but it’s more than 100 lines of code. If you only need one or two bars, try my solution instead. The example page shows three div elements with a styled horizontal and/or vertical scrollbars.
I added an example to the Flotr example section. This example shows how to use requested JSON data to draw a graph. Go to the example section or take a look at the example directly. To learn more about handling JSON with Prototype, read Introduction to JSON
I’m proud to announce Flotr 0.1.0 alpha, a javascript plotting library based on the Prototype Javascript Framework (version 1.6.0.2 at the moment). This new (22kb) piece of javascript enables you to draw appealing graphs in most modern browsers. It replaces my older (and deprecated) plotting library Plotr. This time I took some more time to write documentation and examples, see the result on the Flotr project page.
Flotr is actually a rewrite of Flot (by Ole Laursen), a javascript plotting engine for jQuery. I (partially) rewrote it to use Prototype and added some new features like event hooks and mouse tracking.

I’m optimizing this blog at the moment, and I’m learning quite some new things about compression, gzipping and other optimization techniques. I’m using the Yahoo! YSlow extension for Firefox to see if I’m heading in the right direction. In this article I’ll explain the three best techniques I used to speed up solutoire.com.