Mootools (Revision 83)
Total Page:16
File Type:pdf, Size:1020Kb
Mootools (revision 83) http://mootools.net/ Array.js Element.js Dom.js Fx.js Fxpack.js Json.js Array Element Element Fx.Base Fx.Scroll(el, options) Json forEach(fn, bind o) intialize(tagname s) getElements(selector) options = { down() toString(json o) each = forEach injectBefore(el) getElement(selector) onStart: fn, up() evaluate(s) onComplete: fn, copy() injectAfter(el) getElementsBySelector(s) Fx.Slide(el, options) remove(s) injectInside(el) transition: Fx.Transition, Tips.js options = { test(s) adopt(el) Elements duration: (500) ms, Tips(els, options) action({event:fn, ...}) mode: (‘vertical’)||’horizontal’ extend(a) remove() unit: (‘px’)||’em’||’%’, options = { } associate([ ]) clone() Utility Functions wait: (true)||false, transitionStart: Fx.Transitions, replaceWith(el) $S(selector s, s, ...) fps: (30) n hide() transitionEnd: Fx.Transitions, Utility Functions appendText(s) $$() = $S } show() maxTitleChars: (30) n, $A(a) = Array.copy hasClass(s) $E(selector s, el) set(to n) toggle() fxDuration: (150) ms, Function.js addClass(s) #ES(selector s, el) custom(from n, to n) Fx.Color(el, options) maxOpacity: (1) n, removeClass(s) document clearTimer() custom(fromHex s, toHex s) timeOut: (100) ms, Function toggleClass(s) .getElementsByClassName(s) className: s pass([args,...], bind o) Fx.Style(el, property, options) fromColor(hex s) setStyle(property, value) toColor(hex s) } bind(o) setStyles({prop:value,..}||s) Drag.js hide() bindAsEventListener(o) setOpacity(n) goTo(n) Fxutils.js Window.js delay(ms, bind o) getStyle(property) Drag.Base(el, xM, yM, options) periodical(ms, bind o) options = { Fx.Styles(el, options) Fx.Height, Fx.Width, Window addEvent(event, f) custom({prop:[start, end],...}) Fx.Opacity(el, options) removeEvent(event, f) handle: el, disableImageCache() toggle() Utility Functions getPrevious() onStart: fn, Element getWidth() $clear(timer) show() getFirst() onComplete: fn, effect() = Fx.Style getHeight() $type(o) getNext() onDrag: fn, effects() = Fx.Styles Fxtransitions.js getScrollHeight() Chain getLast() xMax:n, xMin:n, Fx.Transitions getScrollWidth() setProperty(prop, value) yMax:n, yMin:n linear, sineInOut Fx.Transitions getScrollTop() chain(fn) linear, quadIn, quadOut, setProperties({prop:val,...}) } getScrollLeft() callChain() quadInOut, cubicIn, cubicOut, setHTML(html) onDomReady(fn) clearChain() Drag.Move(el, options) Ajax.js cubicInOut, quartIn, quartOut, getProperty(property) options = { quartInOut, quintIn, quinOut, String.js getTag() Ajax(url, options) Accordion.js snap: (true)||false, quintInOut, sineIn, sineOut, getTop() options = { String snapDistance: (8) n, sineInOut, expoIn, expoOut, Fx.Elements(el, options) test(pattern s, params s) getLeft() method: (‘post’)||’get’, custom({ onSnap: fn, expoInOut, circIn, circOut, toInt() getValue() xMod: (left) prop, postBody: s || o || Form el ’0’:{’prop’:[start, end],...}, circInOut, elasticIn, elasticOut, camelCase() yMod: (top) prop, async:(true)||false, ’1’:{’prop’:[start,end],...}, elasticInOut, backIn, backOut, capitalize() Utility Functions container: true||(false) onComplete:fn, ... }) backInOut, bounceIn, trim() $Element(el, method s, args) } onStateChange:fn, $(el|s) update: el, bounceOut, bounceInOut clean() Element Fx.Accordion(els, rgbToHex(returnArray b) evalScripts: true||(false) togglers els, options) makeDraggable(options) } hexToRgb(returnArray b) Sortables.js options = { Moo.js makeResizable(options) request() Sortables(els, options) getPosition() start: (‘open-first’)||’first-open’, Number Class evalScripts() options = { fixedHeight: (false) n, toInt() empty() handles: els, fixedWidth: (false) n, create(o) Object fxDuration: (250) ms, alwaysHide: true||(false), extend(o) toQueryString() fxTransition: Fx.Transitions, wait: true||(false), implement(o) Element maxOpacity: n, onActive: fn, send() Object (singleton) onStart: fn, onBackground: fn, extend(base o, other o) toQueryString() onComplete: fn, height: (true)||false, Native(o) contain: (true)||false opacity: (true)||false, } width: true||(false) } Cookie.js showThisHideOpen(index n) Cookie set(key s, value, days n) get(key s) remove(key s).