Home  Client Side Scripting  MooTools

“MooTools frequently Asked Questions in various Client side scripting language MooTools job Interviews by interviewer. The set of questions here ensures that you offer a perfect answer posed to you. So get preparation for your new job hunting”

16 MooTools Questions And Answers

4⟩ How to call the gallery from outside in MooTools?

First, when you create your gallery, you should store it in an object. In the Getting Started guide, we called this object myGallery so let's continue to use this name for our examples.

Just call the childs functions like this:



5⟩ Suppose I want to change the way I feed the slideshow. How can I change the elements and classes it is using?

Doing so is very simple. SmoothGallery uses CSS Selectors to select elements and values. Just keep in mind that values are contained by an element.

Here are the options to change the selectors used, and their default values:

elementSelector: "div.imageElement",

titleSelector: "h3",

subtitleSelector: "p",

linkSelector: "",

imageSelector: "img.full",

thumbnailSelector: "img.thumbnail"


8⟩ How to change the arrows and their position in MooTools?

Well, you have two options:

► Either change the arrows for all the galleries, by changing those selectors background values in

.jdGallery a.left and .jdGallery a.right for all the browsers

and * html .jdGallery a.left and * html .jdGallery a.right for IE6.

► Or, you could change the arrows and position for a specific instance of the galleries in your own css file (called after the smoothgallery one), with the selectors:

#myGalleryId a.left and #myGalleryId a.right

(see how it's done in for more info on the css settings).


12⟩ Explain MooTools benefits?

MooTools provides the user with a number of advantages over native JavaScript. These include:

► An extensible and modular framework allowing developers to choose their own customized combination of components.

► MooTools follows object-oriented practices and the DRY principle.

► An advanced effects component, with optimized transitions such as easing equations used by many Flash developers.

► Enhancements to the DOM, enabling developers to easily add, modify, select, and delete DOM elements. Storing and retrieving information with Element storage is also supported.


14⟩ Explain MooTools Components?

MooTools includes a number of components, but not all need to be loaded for each application. Some of the component categories are:

► Core: A collection of utility functions that all the other components require.

► More: An official collection of add-ons that extend the Core and provide enhanced functionality.

► Class: The base library for Class object instantiation.

► Natives: A collection of JavaScript Native Object enhancements. The Natives add functionality, compatibility, and new methods that simplify coding.

► Element: Contains a large number of enhancements and compatibility standardization to the HTML Element object.

► Fx: An advanced effects-API to animate page elements.

► Request: Includes XHR interface, Cookie, JSON, and HTML retrieval-specific tools for developers to exploit.

► Window: Provides a cross-browser interface to client-specific information, such as the dimensions of the window.


16⟩ What is MooTools?

MooTools originated from Moo.fx, a popular plug-in Proietti produced for Prototype in October 2005, which is still maintained and used.