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
7
votes
1 answer

How to Horizontally scroll a webpage?

I want to develop a webpage that moves towards the left direction whenever the user scrolls down the mousewheel. Generally all websites are vertical scrolling. But this one should scroll horizontally. Example code:
Sujit Agarwal
  • 12,348
  • 11
  • 48
  • 79
7
votes
1 answer

Prevent Mootools Mouseenter from firing on hidden child elements

I have a content slider that auto rotates that when you hover over it it will stop rotating. My problem is this bit of code here: $$('.holder').addEvents({ mouseover: function(){ clearInterval(rollingon); }, mouseout:…
7
votes
2 answers

Programmatically fired events not working with event delegation

Would really appreciate if anyone can help me figure out why I am unable to fire events programmatically when using event delegation in MooTools (from the Element.Delegation class). There is a parent
that has a change listener on some child…
Anurag
  • 140,337
  • 36
  • 221
  • 257
7
votes
1 answer

jQuery: Open File Upload window by pressing a link or image.?

Is this possible to open a File Upload window when clicking on a image or link. (like what exactly in the ).
coderex
  • 27,225
  • 45
  • 116
  • 170
7
votes
7 answers

Jquery associate two arrays (key, value) into one array

How can I associate two arrays that contains keys and values into one array with key->value pairs? In Mootools there is associate function which does: var animals = ['Cow', 'Pig', 'Dog', 'Cat']; var sounds = ['Moo', 'Oink', 'Woof',…
tzortzik
  • 4,993
  • 9
  • 57
  • 88
7
votes
1 answer

How to implement OnDestroy/OnDispose event in JS/Mootools?

Is there any existing OnDestroy/OnDispose event in JavaScript or are there any known custom implementations in plain JS or Mootools? Let's say I want to call console.log('bye') when an element gets destroyed/removed from the DOM. Something similar…
Slava
  • 2,887
  • 3
  • 30
  • 39
7
votes
10 answers

What's the downside of using too much JavaScript?

I would like to know what are some downsides using too much JavaScript code in a web page? For example, I will use a jQuery framework for my dropdown menus, tabs and accordion. And other JavaScripts for my calendar (even-though there is available…
Pennf0lio
  • 3,888
  • 8
  • 46
  • 70
6
votes
2 answers

Mootools: Drag & Drop problems

I've asked this question to the forums on the Mootools website and one person said that my class selection was corrupted before an admin came along and changed my post status to invalid. Needless to say this did not help much. I then posted to a…
Dale Marshall
  • 1,137
  • 7
  • 20
  • 42
6
votes
1 answer

howto create the iPhone Contacts header scroll Effect for html?

I've setup a basic jsFiddle to give more of an idea of what I'd like to happen. http://jsfiddle.net/nicekiwi/p7NaQ/2/ Hopefully if you think of the contact page on the iOS for the iPhone in terms of what section of the alphabet of contacts you're…
Nicekiwi
  • 4,567
  • 11
  • 49
  • 88
6
votes
3 answers

Javascript parse html, modify anchor tags that contain images

I have a vague idea on howto do this but I hoped more experienced devs might have a simpler solution. I have a sting of HTML code from a JSON feed and where an "a" tag exists with an images inside the "a" tag I want to modify and add attributes.…
Nicekiwi
  • 4,567
  • 11
  • 49
  • 88
6
votes
10 answers

How do I inject javascript to a page on IE 8?

Lets suppose that I have the following markup:
and I have a JavaScript variable jsVar that contains some markup and some JavaScript. By using Mootools 1.1 I can inject the JavaScript content into the placeholder like…
adolfojp
  • 2,961
  • 4
  • 24
  • 21
6
votes
3 answers

Replace whole element rather than innerHTML?

I can do this: $('my-panel').innerHTML = '

New content

'; But if there any way of doing something like $('my-panel').wholeHTML = "

New Content

"; I can't find any way. If I can't do something like this, I'll…
Oliver
  • 11,297
  • 18
  • 71
  • 121
6
votes
2 answers

Element reference breaks on modification of innerHTML property of container

When creating elements via code, I have encountered an issue where modifying the innerHTML property of an element breaks any references to other elements that are injected into the modified element prior to the modification. I have a test case here:…
Chris Baker
  • 49,926
  • 12
  • 96
  • 115
6
votes
3 answers

PHP - generating JavaScript

I am working on a project which has a lot of JavaScript. I think that generating simple strings and putting them between "