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
9
votes
5 answers

What are your favorite Mootools/Prototype native object prototypes?

Us Mootoolers and Prototypers (what few are on this site) usually carry around a handy toolbox of functions we have created (or borrowed) that we implement on native javascript objects to make our lives a little easier. I wanted get a list together…
TJ L
  • 23,914
  • 7
  • 59
  • 77
8
votes
3 answers

Drag with mootools on mobile

Is there a way to make to work the mootools class "Drag" on Safari mobile? Please don't link me to other frameworks.
aartiles
  • 1,439
  • 4
  • 16
  • 31
8
votes
2 answers

Never-ending "Connecting" message after AJAX form submit

I have a class which enables forms with a file-type input to be submitted via AJAX. It creates a hidden IFRAME element, changes the form target property so that it submits to the IFRAME, submits the form, then changes the target back to what it was.…
Chris Baker
  • 49,926
  • 12
  • 96
  • 115
8
votes
2 answers

Upload a binary file using pure JavaScript

I'm working on a Chrome app that uses the HTML5 Filesystem API, and allows users to import and sync files. One issue I'm having is that if the user tries to sync image files, the files get corrupted during the upload process to the server. I'm…
Jordon Wii
  • 151
  • 1
  • 1
  • 8
8
votes
0 answers

Another time: mootools vs jQuery

I've just finished to translate (in Italian...for Italian developers that are too lazy to learn English :D ) this great article (by Aaron Newton) about the topic the title refers to: http://jqueryvsmootools.com/ While I was doing it, I had the…
stecb
  • 14,478
  • 2
  • 50
  • 68
8
votes
4 answers

Best practices for static methods and variables with MooTools classes

Are there any best practices or common solutions to adding support for "static" methods and variables to MooTools-generated classes? In particular, is there any solution that ensures that static initialization takes place before the instance…
kpozin
  • 25,691
  • 19
  • 57
  • 76
8
votes
6 answers

What kind of JavaScript is this?

I have an application that has this format scattered around but I dont know what kind it is. It's not jQuery, so what is it? $('some_edit').style.display = "block"; $('some_views').style.display = "none"; I get this in firebug and I know the…
Matt Elhotiby
  • 43,028
  • 85
  • 218
  • 321
8
votes
3 answers

Select text and then calculate its distance from top with Javascript?

Is it possible with JavaScript to find a given string of text on a webpage, and then calculate its distance (in pixels) from the top of the page? If so, an example would be appreciated.
user379588
  • 83
  • 5
8
votes
7 answers

How to execute "eval" without writing "eval" in JavaScript

Here's the deal, we have a big JS library that we want to compress, but YUI compressor doesn't fully compress the code if it finds an "eval" statement, out of fear that it will break something else. That's great and all, but we know exactly what is…
adamJLev
  • 13,713
  • 11
  • 60
  • 65
8
votes
1 answer

JavaScript keypress event get end value of textarea

I was wondering if it were possible to get the end result in the keypress event? Currently, I am using the keyup because it is activated after the user has done text editing in a texteara, but I have written a method that does something similar…
8
votes
4 answers

Is there a way to search for attributes that start with a certain string in HTML

Is there a way to find all the elements with attributes that start with a particular string? I am using Mootools framework and this is what I have tried: $$('*[data-media-*]'); But it just outputs all the elements in the page. So is there a way to…
jnbdz
  • 4,863
  • 9
  • 51
  • 93
7
votes
3 answers

localStorage Size Limits... What are the options?

I plan to use persistant localStorage in one of my projects and i have found out that the size limitation is 5 MB (chrome). I searched other frameworks which implmented the same thing, like Mootools, Dojo, Lawnchair but i couldnt find out what are…
Pheonix
  • 6,049
  • 6
  • 30
  • 48
7
votes
1 answer

iframe contents disappear when manipulated by mootools

I've got a third party (mootools) library creating tabs and I've got google double click for publishers (dfp) creating ads. dfp creates the ads in an iframe then the tabs script grabs an anchestor of the iframe and 'messes' with it to create the…
Aidan Ewen
  • 13,049
  • 8
  • 63
  • 88
7
votes
2 answers

strange syntax in javascript

I'm working on debugging some code someone else wrote (using Mootools as the base library), and I came across this function: [note, $H(options.text).getKeys()].flatten().each(function(option){ // bunch of stuff happening }); I've never seen this…
julio
  • 6,630
  • 15
  • 60
  • 82
7
votes
3 answers

Mootools get the child-index of an element from its parent

I am using event delegation in mootools. I want to know the row number that has been clicked. My solution is shown in this jsfiddle: Is there a better way than what I am currently doing? My approach was to compare the elements until i found the…
Paul
  • 6,572
  • 2
  • 39
  • 51