Everybody who’s working with WordPress knows the ‘widgetised’ dashboard. A couple of weeks ago I wanted two lists to sort and also to drag one list item from one list to the other. I’ve searched over the internet to a nice plugin to do this. I discovered (maybe you guys are aware of this) that the default Sortable behavior of Mootools 1.2 is also to sort two list at a time.
I’ve made a simple example so you’ll see how it works. Read more about the set up in the full article.
View example
Continue Reading »
I’ve searched on the internet for a good, simple and working example of the Drag.Cart plugin for Mootools 1.2+ but I haven’t found a single one. This is what I mean: the original Ghost Drag demo for Mootools 1.1.
Here it is, a working example for Mootools 1.2+. Good luck and take a look at the actual documentation I’ve you need some more information.
View example
Continue Reading »
A couple of days ago David Walsh posted a blog entry where he recommended a video from Google about JavaScript. I’ve found this very interesting and I have done some research about how to implement this very easy to Mootools. There are a lot of do’s and dont’s but what is the best practice for us as a Mootools developer? How to avoid the basic Mootools solutions and speed up your plugins? Well, I’ll post my neat workarounds to get your speed up.
I’ll start with modifying the DOM by injecting elements with the Mootools function inject(). Injecting elements to the DOM is very common with Mootools but it will make it slow down. To speed up you’ll have to do as little DOM modification as possible.
For example you load a JSON file and add elements depending on the content of the request. In this example we don’t avoid the Mootools each() function. We focus on the point that we don’t call the inject() function every time. This is my solution. Continue Reading »