Quantcast
Channel: javascript – frag (frăg)
Browsing all 37 articles
Browse latest View live

How to clone element storage in mootools

Ever needed to clone an element and take your element storage with it? I have and it’s not easy. There’s Element.cloneEvents(), which takes the storage.events callbacks but any other storage you may...

View Article



Tutorial: write a small content slider Class in MooTools and extend it

Difficulty: moderate Framework: MooTools 1.3 (no previous ver compatibility) Dependencies: MooTools-more 1.3.1 (no compat mode, just Element.Delegation required to build it) DocType: HTML5 – optional...

View Article

A powerful and simple mootools modal window class called “baseBox”

This was completely overhauled. Basically, I just released a new mootools modalBox Class called ‘baseBox’. You can see it on jsfiddle and play with it some. Full details, documentation are available on...

View Article

CKeditor blues: when it fails to pass on the data via AJAX

CKeditor is a good WYSIWYG content editor and is very popular in various CMS and on-page editing tools. It _tends_ to work and is helpful to those who cannot use HTML natively. However, from a...

View Article

mootools flickr api class via Request.JSONP

updated for mootools 1.3.2 I needed to bring some images into a thumbnail/gallery and decided to use flickr’s API for easy access. The result is a mini-api which allows you to control your options and...

View Article


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

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
Browsing all 37 articles
Browse latest View live




Latest Images