Mootools Core

ADVERTISEMENT

Object
Array
Element
Request
Request.HTML
Type:
Type:
Class:
Class:
Static methods
Element
Window
new Request.HTML([opt])
Array.each(iterable, fn [, bind])
new Request( [opt] )
Type:
Type:
mootools Core
(O = Object)
Array.clone(a)
document.id(el | s | o)
opt = {
opt = { all opt from Request +
* O.each(fn(v, k, o){} [, bn])
new Element(tag s | el |
Full CheatSheet for Javascript
$
url: s,
update: el,
Array.from(o)
* O.every(fn(v, k, o){} [, bn])
selector s [, opt])
Alias:
Framework mootools 1.3
method: post | get,
append: el,
* each(fn(el, i, a){} [, bn])
(function($){
by
mediavrog.net/blog/
* O.filter(fn(v, k, o){} [, bn])
each opt calls ‘Element.set’
data: s,
evalScripts: eval<script>?,
// $ is safe in closure (compat!)
* every(fn(el, i, a){} [, bn])
getElement(match)
* O.keyOf(o, value m)
Core
link: ignore | cancel | chain,
filter: fn,
})(document.id)
getElements(match)
* filter(fn(el, i, a){} [, bn])
* O.map(fn(v, k, o){} [, bn])
async: asyncRequest?,
onSuccess(rTree, rElems,
$$(selector s | el a | el[, el, ...])
instanceOf(item m, type m)
getElementById(s)
* indexOf(el [, from n])
* O.some(fn(v, k, o){} [, bn])
any combination; commaseparated
encoding: s, (default: utf-8)
rHTML, rJS)
typeOf(item m)
* map(fn(el, i, a){} [, bn])
set(s, val | o)
* mostly synonymous to Array fn
headers: {name: content},
}
Element.Properties
element, textnode, number,
Object:
O.append(origin o, ext o)
* some(fn(el, i, a){} [, bn])
get(s)
evalScripts: eval<script>?,
get(opt | url s)
whitespace, function, date,
html: htmlStr [, htmlStr [, ...] ]
O.clone(o)
* only if not supported natively
erase(s)
evalResponse: evalAll?,
post(opt | queryString | el)
arguments, array, object, string,
text: textString
append(a)
match(match)
O.contains(o, value m)
put
emulation:
_method?,
boolean, regexp, class, collection,
Element.Properties
prop: propValue
Object:
associate(a)
contains(el)
O.getLength(o)
urlEncoded: formUrlEncoding?,
window, document,event, false
tag
load [, opt]
clean()
(only getter)
timeout: ms,
O.keys(o)
inject(el [, where])
Browser
noCache: forceNoCache?,
Object:
combine(a)
O.merge(o1, o2 [, o3, ...])
<el>myEl</el> (move myEl)
IFrame
Element
Type:
Type:
user: basicAuthUser s,
ie, ie6, ie7, ie8,
contains(el [, from n])
O.subset(o, keys a)
grab(el [, where])
load(url s)
new IFrame([el [, opt] ])
> Request.HTML.get
password: basicAuthPasswd s,
firefox, firefox2, firefox3,
erase(el)
O.toQueryString(o)
<myEl>el</myEl> (move el)
Elements
Request.JSON
isSuccess: fn,
Type:
Class:
safari, safari3, safari4,
empty()
O.values(o)
adopt(el [, el a | el [,...] ])
onRequest(),
new Elements(el a [, opt])
new Request.JSON([opt])
chrome, opera
flatten()
String
<myEl>el el</myEl> (move el’s)
onLoadStart(event, xhr),
Type:
filter(sel s)
opt = { all opt from Request +
Features
getLast()
onProgress(event, xhr),
wraps(el [, where])
String.from(m)
Element.Style
secure: checkSyntax?
getRandom()
xpath, xhr, air, query, json
onComplete(),
<myEl>el</myEl> (move myEl)
String.uniqueID()
onComplete(rJSON, rText)
include(el)
Element
onCancel(),
Type:
Request
camelCase()
}
appendText(s)
invoke(method [, arg, arg, ...])
onSuccess(rText, rXml),
setStyle(s, val)
capitalize()
empty()
Platform
remove children
JSON
link(o)
onFailure(xhr),
Object:
setStyles( {s : val, ...} )
clean()
destroy()
trash, free memory
mac, win, linux, ios, webos,
onException(hdName ,val),
pick()
getStyle(s)
JSON.encode(o)
contains(s [, separator s])
dispose()
remove from DOM
onTimeout()
android, other, anyName
rgbToHex(returnArray?)
getStyles(s [, s [, ...] ])
JSON.decode(s [, secure?])
escapeRegExp()
clone([cloneContents?, keepId?])
}
hexToRgb(returnArray?)
Plugins
Element.Event
hyphenate()
Swiff
cancel()
replaces(el)
Class:
Number
Flash
Type:
stripScripts(evaluate?)
hasClass(s)
Element
getHeader(name s)
Type:
new Swiff(swfPath s [, opt])
Class
Number.from(m)
substitute(o [, regex])
addClass(s)
setHeader(name s, val s)
addEvent(e, fn)
opt = {
Number.random(min n, max n)
test(regex [, params])
removeClass(s)
isRunning()
addEvents({e: fn})
id: s
new Class(o | contructor fn)
limit(min n, max n)
toInt(),
send( [Request opt] )
toggleClass(s)
width: n, height : n,
special properties:
removeEvent(e, fn)
round([n])
toFloat()
container: el,
getPrevious([match])
Extends: o | class | a,
removeEvents([e])
Element.Properties
Object:
times(fn [, bn])
trim()
params: swfParams,
Implements: o,
getAllPrevious([match])
fireEvent(e [, args, delay])
send [, Request opt]
toInt(), toFloat()
properties: o,
initialize: fn (=constructor)
rgbToHex(returnArray?)
getNext([match])
cloneEvents(from el [, type s])
Element
vars: o,
implement(o)
Type:
hexToRgb(returnArray?)
getAllNext([match])
Methods from ‘Math’
Element.Events
events: o
Object:
send([url s])
(only on <form>)
Class.Extras
Function
getFirst([match])
abs, acos, asin, atan2, ceil, cos,
Type:
}
Element.Events.key = o
getLast([match])
Cookie
exp, floor, log, max, min, pow, sin,
Chain
Object:
Function.from(m)
swfParams = {
Class:
o = { base: e, condition: fn,
sqrt, tan
getParent([match])
Cookie.write(key s, value s [, opt])
allowScriptAccess: s,
Function.attempt(fn [, fn [, ...] ])
new Class({Implements: Chain})
onAdd: fn, onRemove: fn }
Event
getParents([match])
quality: high | medium | low,
Type:
opt = {
callChain([args])
attempt([args [, bn])
Custom Events
getSiblings([match])
swLiveConnect: remoteScripting?,
domain: s, path: s,
new Event([e [, win] ])
chain(fn [, fn [,...] ])
bind([bn [, args] ])
mouseenter
getChildren([match])
wMode: s
duration: n, secure: b?
Properties
clearChain()
delay([ms [, bn [, args] ] ])
mouseleave
}
toQueryString()
}
alt, client.x, client.y, code, control,
extend(key s, value m)
mousewheel
Events
Class:
Swiff.remote( mySwiff o, fn
getSelected()
Cookie.read(key s)
(only on <select>)
key, meta, page.x, page.y, shift,
implement(key s, value m)
Element.Dimensions
new Class({Implements: Events})
[, arg, arg, ...])
getProperty(s)
Cookie.dispose(key s [, opt])
relatedTarget, rightClick, target,
pass([args [, bn])
addEvent(s, fn [, internal?])
Element
wheel
getProperties(s [,s [, ...] ])
Type:
domready
Slick (Selectors)
periodical([ms [, bn [, args] ] ])
WindowEvent:
Class:
addEvents(o, fn [, internal?])
‘key’ can be:
getCoordinates()
setProperty(s, val)
domready
‘Slick’ engine FTW!
fireEvent(s [, args, delay ms])
bindWithEvent
replace:
enter, up, down, left, right, tab,
getOffsetParent()
setProperties( {s: val, ...} )
the all time favourite ;)
removeEvent(s, fn)
myEl.addEvent(“click“,function(e){
space, backspace, delete, esc
getPosition(relative el)
removeProperty(s)
removeEvents([s])
myFunction.bind(bn [, e])
preventDefault()
o ~ Object
e
~ Event
bn
~ Element to bind ‘this’
setPosition( {x: posX, y: posY} )
removeProperties(s [,s [, ...] ])
})
s ~ String
fn ~ Function
[ ]
~ optional
stop(), stopPropagation()
getScroll(), getScrollSize()
Options
store(s, val)
Class:
a ~ Array
el ~ Element
|
~ choice / or
getSize()
new Class({Implements: Options})
run
Event.Keys
retreive(s [, default m])
Object:
replace:
n ~ Number
el a ~ Array of el
ms
~ Milliseconds
setOptions([opt])
scrollTo(x,y)
eliminate(s)
Event.Keys.key = keyCode
myFn.apply(bn, arg)
? ~ Boolean
m ~ mixed
match ~ CSS Selector

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go
Page of 2