Quantcast
Channel: frag (frăg) » mootools
Browsing latest articles
Browse All 29 View Live

MooTools pattern fun: Class Implements + Extends at the same time

Update: Thanks to @CarstenSchwede, who pointed out that the MooTools Class Constructor expects the Extends mutator __before__ the Implements one, meaning you don’t need to worry about any of the stuff...

View Article



Lazyloading multiple sequential javascript dependencies in MooTools

We all know and love Asset.js from MooTools-more. It affords you lazyloading by providing Asset.javascript, Asset.image, Asset.images and Asset.css. However, sometimes you need more precision when...

View Article

Working with dynamic Class names in MooTools

This is somewhat trivial but is also useful and is a common question that a lot of people ask. The problem is in 2 parts: How to instantiate a Class based upon a dynamic name/variable and how to...

View Article

mooPlaceholder revisited: a flexible placeholder input solution for IE and...

Creating some javascript that can mimic the HTML5 behavior of a placeholder= attribute on an input element can be simple. Unfortunately, getting a single solution you can work with that fits all...

View Article

Using MooTools class mutators to log method calls

When you are debugging a huge web app, comprised of many classes and many methods, it can be really tedious and difficult. Having to go and edit code and add `console.log` calls all over the place is...

View Article


New mootools plugins released on github/forge

Time to wrap up the year, I think. I released 2 more small plugins of mine on github and the MooTools forge. mooTagify GitGub project page: https://github.com/DimitarChristoff/mooTagify Forge link:...

View Article

substitutePath – a string method that recursively replaces values from an object

Originally, this was meant to be released as something for String.Extras in mootools-more as an idea by Oskar, coined by myself with input from csuwldcat – but it seems that the pull request is not...

View Article

A larger MooTools logo

I had to look around and find an up-to date mootools logo of a decent size and I couldn’t find one. Hence, I took an old and small AI file and updated it to the current colours, ending up with the logo...

View Article


MooTools in a distant future: how to write to better survive the changes

You may have already heard this, or maybe not. But this won’t change the fact that javascript is changing and the way people write it and specifically, how they write the libraries, modules and widgets...

View Article


Using overloadSetter / overloadGetter to make flexible functions in mootools

This is a really helpful feature of MooTools that a few people know and use. Basically, there is a pair of 2 Function prototypes called ‘overloadGetter‘ and ‘overloadSetter‘. They are very simple in...

View Article

Manage lazy-loading handlebars / mustache / other templates via MooTools

I have started using Backbone.js but with handlebars templates (like in Ember.js) that I parse through Underscore.js. Anyway, to cut a long story short – I did not want to have a bunch of flat script...

View Article

MooTools Request.Spy – monitor all requests through the Request class prototype

An interesting question on StackOverflow prompted me to look into creating a universal spy/logger for all Requests that MooTools. The objective is: being able to log / spy on all XHR requests w/o...

View Article

MooTools plugins round-up

Time for a round-up of interesting / quality plugins on the MooTools forge or github. Again. First off, my favourite find over the last month has to be the MooTools Router. What it does is handle...

View Article


StrongPass: A password strength helper class

Good news, everyone (I miss Futurama). Three years ago I wrote a mootools plugin for password strength checking, based upon a stack overflow jquery post. I just had cause to revisit this for work at...

View Article

new mootools github repos for handy little tools

Right then. If you don’t follow me on github, this will be news to you. Storage. https://github.com/DimitarChristoff/Storage – it’s a class that allows you to API localStorage or sessionStorage, when...

View Article


Epitome: an example MooTools model / MVC tutorial

I have been a little busy at work but we recently built a small Model class to support our question set and I turned it into a tutorial on how to build your own MV* framework on top of MooTools. It is...

View Article

So you want delayed events in your mootools class?

I recently found that in the context of Class, .fireEvent() accepts a 3-rd argument, delay. Firing deferred events can be useful but you need to understand the full difference between the patterns...

View Article


Epitome goes CI via buster.js and Travis CI

Just a quick note – the MooTools MV* framework I wrote for QMetric called ‘Epitome‘ is now covered by Travis CI automated testing. Read more about how to implement this in your javascript projects in...

View Article

Epitome does todo

Just a quick update, my MooTools MVP library Epitome now has its own Epitome-todo repository as a submodule, an implementation of the popular TodoMVC demo. You can see it live here. If you checkout...

View Article

Spying unobtrusively on Class instance events in MooTools

Ever needed to debug how your Class instances fire Events? It can be frustrating and messy, especially if you do not have access to the original Class prototype source. But, you can hack your way...

View Article

Extend Slick pseudo selector to find data-attributes

This is a relatively simple idea. Select elements with data-attributes that match a pattern, for example, div[data-media-*]. The problem is, CSS selectors don;t allow you to wildcard attributes...

View Article


Hiding enumerables after MooTools changes prototypes

One of the most common complaints of people when using 3-rd party code that breaks on MooTools pages is when somebody incorrectly tries to iterate through an Array with the for (var in) operator and...

View Article


Epitome now available as npm and under CommonJS

Just a quick update, Epitome now supports nodejs. Here’s an example creating a server via express and socket.io with a collection and a model that can be shared on the client as well: #!/usr/bin/env...

View Article

Image may be NSFW.
Clik here to view.

primish. It’s like mootools prime but for the intarnets

We waited for ages for MooTools prime to come out and to get adopted and for web builds to show up and to become more MooTools-y. And then, we thought (me and the Grookedge who’s also a MooTools...

View Article

Hacking MooTools Elements and Storage / UIDs

Any element that has either being created or is passed on through a selector, gets assigned a property uid, which is incremental and unique. Since MooTools 1.4.2, this is only readable via...

View Article

Browsing latest articles
Browse All 29 View Live




Latest Images