Questions tagged [mootools]

MooTools is a compact, modular, object-oriented prototypal JavaScript framework designed for the intermediate to advanced JavaScript developer. It allows you to write powerful, flexible, and cross-browser code with its elegant, well documented, and coherent API.

MooTools is a compact, modular, object-oriented JavaScript framework designed for the intermediate to advanced JavaScript developer. It allows you to write powerful, flexible, and cross-browser code with its elegant, well documented, and coherent API.


Hello World Example

window.addEvent('domready', function(){
    document.getElements('a').addEvent('click', function(event){
        event.stop();
        console.log('hello world from link with href ' + this.get('href'));
    });
});

Questions Tagged with

When asking a question:

  1. Consult the MooTools API documentation and search Stack Overflow for similar questions already answered before asking a question.
  2. Isolate the problematic code and reproduce it in an online environment such as jsFiddle or JS Bin. If applicable, include a link to the fiddle or online environment in your question. Always include the problematic code in your question.
  3. Tag your question with a MooTools version. The available tags are
    , , and .
    If a tag for your MooTools version does not exist, mention it in your question. See the "Version Information" section below for more information.
  4. If your question deals with any of the following aspects of MooTools, include the corresponding tag:
  5. Tag the question with other web-development tags if applicable
    (e.g., , , , etc.).
  6. Mention the browser(s) and browser version(s) where the problem occurs. If the browser or browser version is an important aspect of the question, include it as a tag
    (e.g., , , , etc.).

MooTools for Beginners

If you are just starting with MooTools, then you should read the following guides:


Version Information

The current version is MooTools 1.6.0 released Jan 14th, 2016. This is a maintenance / bug fix release.

For specific information about a particular MooTools version, see the tag wiki for that version or read the release notes on the official blog.

List of major stable MooTools Versions


MooTools Resources

Online Resources

MooTools Extensions / Utilities

  • Moobile - a new mobile application framework launched in April 2012 that is similar to jQuery Mobile in terms of the functionality it affords
  • Epitome - a MVC/MVP framework for MooTools 1.4.5+
  • MooDocu - a browser-based, client-side MooTools documentation parser with search; it works off-line through localStorage

MooTools Books

2586 questions
11
votes
2 answers

How can I focus on an input field when a phonegap page loads?

I would like to focus on a text input in a PhoneGap application when the page loads. I have tried the MooTools version $('entry').focus(); and document.getElementById('entry').focus() when the DOM is ready. This works fine when the HTML page is…
827
  • 4,864
  • 4
  • 19
  • 24
11
votes
7 answers

How can I write code without "needing" comments for readability?

Possible Duplicate: Is it possible to write good and understandable code without any comments? When coding often I hear that if comments are needed then it means that the code is too hard to understand. I agree that code should be readable but…
yazz.com
  • 57,320
  • 66
  • 234
  • 385
11
votes
9 answers

MooTools and JQuery Side by Side

I just inherited some web pages which uses MooTools. I never used MooTools. Now I need to add some functions on the page, I wonder if it's a good idea to use jquery and mooTools on the same page? Basically, I have 3 options, Convert the pages to…
ZZ Coder
  • 74,484
  • 29
  • 137
  • 169
10
votes
3 answers

Inserting a Div Into another Div?

Im creating a web app and would like to know why the following code is not working. It first creates a element which is then added to the body. I then create another Div element which i would like to place inside the first div element that i…
Michael Smith
  • 101
  • 1
  • 1
  • 3
10
votes
4 answers

Deep changing values in a JavaScript object

I have an object which contains an unknown number of other objects. Each (sub-)object may contain boolean values as strings and I want to change them to real boolean values. Here's an example object: var myObj = { my1stLevelKey1: "true", …
10
votes
3 answers

Mootools "Extends" plus "Implements"

I like to write my code slim and sexy (on the performance and memory side), I am using Mootools and was wondering if I was using it the correct way, also you can help me by telling me how to test my code to find the answers I am looking for my…
user122539
10
votes
3 answers

find select option by text

Can anyone tell me why this works in older versions of jQuery (e.g. 1.4.2) but if you switch to a later version, e.g. (1.6 +) it stops working? http://jsfiddle.net/nmvf6/1194/ $(function(){ $('#my_button').click(function(){ var unitName…
CMR
  • 1,366
  • 4
  • 15
  • 31
9
votes
4 answers

How different is Ext JS from others like jQuery and Mootools

When looking at Ext JS, I don't get the feeling that it's meant for the same things as jQuery and Mootools. Whilst jQuery and Mootools help with the general workings of a site, Ext JS seems to be focussed on tables and storing data, plus…
KdgDev
  • 14,299
  • 46
  • 120
  • 156
9
votes
4 answers

For loop improved with ">>>" operator?

I'm updating mootools from 1.3.2 to 1.4.1. I saw a strange change. From this for (var i = 0, l = this.length; i < l; i++){.... to this for (var i = 0, l = this.length >>> 0; i < l; i++){ how the ">>>" operator, used in that way, can improve…
Antonio
  • 1,065
  • 3
  • 14
  • 27
9
votes
6 answers

Hidden Features of MooTools

What are the hidden or obscure features of MooTools that every MooTools developer should be aware of? One feature per answer, please.
artlung
  • 33,305
  • 16
  • 69
  • 121
9
votes
4 answers

In terms of speed: jQuery or Mootools

I've just been looking through the Mootools documentation and it seems to do everything jQuery does with loads of extra features. Incredibly, it all fits into less space than jQuery does. I've always been under the impression that Mootools is…
Bojangles
  • 99,427
  • 50
  • 170
  • 208
9
votes
3 answers

mootools & nodejs

can i use mootools on the serverside with nodejs? If so, can someone give an example?
Tyler Gillies
  • 1,857
  • 4
  • 22
  • 31
9
votes
2 answers

How to exit mootools each()

How can I exit the each function when the conditions was true once? This does not work: $$('.box div').each(function(e) { if(e.get('html') == '') { e.set('html', 'test'); exit; } });
Billy
  • 125
  • 2
  • 7
9
votes
9 answers

Mootools - how to get value of selected radio input type, from its name

Question 1: Given In Mootools, how do I return "2" given an input of "foo", assuming that the second radio button…
philfreo
  • 41,941
  • 26
  • 128
  • 141