Mootools Core

Mootools Core

Type: Object Type: Array Element Class: Request Class: Request.HTML mootools Core Static methods (O = Object) Array.each(iterable, fn [, bind]) Type: Element Type: Window new Request( [opt] ) new Request.HTML([opt]) * O.each(fn(v, k, o){} [, bn]) Array.clone(a) new Element(tag s | el | document.id(el | s | o) opt = { opt = { all opt from Request + Full CheatSheet for Javascript update: el, Framework mootools 1.3 * O.every(fn(v, k, o){} [, bn]) Array.from(o) selector s [, opt]) Alias: $ url: s, by mediavrog.net/blog/ * O.filter(fn(v, k, o){} [, bn]) * each(fn(el, i, a){} [, bn]) each opt calls ‘Element.set’ (function($){ method: post | get, append: el, evalScripts: eval<script>?, * O.keyOf(o, value m) * every(fn(el, i, a){} [, bn]) getElement(match) // $ is safe in closure (compat!) data: s, link: ignore | cancel | chain, filter: fn, Core * O.map(fn(v, k, o){} [, bn]) * filter(fn(el, i, a){} [, bn]) getElements(match) })(document.id) async: asyncRequest?, onSuccess(rTree, rElems, instanceOf(item m, type m) * indexOf(el [, from n]) getElementById(s) $$(selector s | el a | el[, el, ...]) * O.some(fn(v, k, o){} [, bn]) any combination; commaseparated encoding: s, (default: utf-8) rHTML, rJS) typeOf(item m) set(s, val | o) * mostly synonymous to Array fn * map(fn(el, i, a){} [, bn]) headers: {name: content}, } element, textnode, number, Object: Element.Properties O.append(origin o, ext o) * some(fn(el, i, a){} [, bn]) get(s) evalScripts: eval<script>?, whitespace, function, date, get(opt | url s) O.clone(o) * only if not supported natively erase(s) html: htmlStr [, htmlStr [, ...] ] evalResponse: evalAll?, arguments, array, object, string, post(opt | queryString | el) O.contains(o, value m) append(a) match(match) text: textString emulation: put_method?, boolean, regexp, class, collection, associate(a) prop: propValue urlEncoded: formUrlEncoding?, Object: Element.Properties window, document,event, false O.getLength(o) contains(el) O.keys(o) clean() inject(el [, where]) tag (only getter) timeout: ms, load [, opt] Object: noCache: forceNoCache?, Browser O.merge(o1, o2 [, o3, ...]) combine(a) <el>myEl</el> (move myEl) Type: IFrame Type: Element user: basicAuthUser s, ie, ie6, ie7, ie8, O.subset(o, keys a) contains(el [, from n]) grab(el [, where]) load(url s) > Request.HTML.get new IFrame([el [, opt] ]) password: basicAuthPasswd s, firefox, firefox2, firefox3, O.toQueryString(o) erase(el) <myEl>el</myEl> (move el) isSuccess: fn, safari, safari3, safari4, O.values(o) empty() Type: Elements Class: Request.JSON adopt(el [, el a | el [,...] ]) onRequest(), chrome, opera flatten() new Elements(el a [, opt]) new Request.JSON([opt]) Type: String <myEl>el el</myEl> (move el’s) onLoadStart(event, xhr), Features getLast() filter(sel s) opt = { all opt from Request + String.from(m) wraps(el [, where]) onProgress(event, xhr), secure: checkSyntax? xpath, xhr, air, query, json getRandom() Element.Style String.uniqueID() <myEl>el</myEl> (move myEl) onComplete(), onComplete(rJSON, rText) include(el) Type: Element onCancel(), Request camelCase() appendText(s) } invoke(method [, arg, arg, ...]) setStyle(s, val) onSuccess(rText, rXml), capitalize() empty() remove children Platform link(o) setStyles( {s : val, ...} ) onFailure(xhr), Object: JSON clean() destroy() trash, free memory mac, win, linux, ios, webos, pick() getStyle(s) onException(hdName ,val), 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?]) } Plugins hexToRgb(returnArray?) hyphenate() replaces(el) Element.Event cancel() Class: Swiff Flash Type: Number stripScripts(evaluate?) hasClass(s) Type: Element getHeader(name s) new Swiff(swfPath s [, opt]) Number.from(m) Class substitute(o [, regex]) addClass(s) addEvent(e, fn) setHeader(name s, val s) opt = { Number.random(min n, max n) new Class(o | contructor fn) test(regex [, params]) removeClass(s) addEvents({e: fn}) isRunning() id: s special properties: toInt(), limit(min n, max n) toggleClass(s) removeEvent(e, fn) send( [Request opt] ) width: n, height : n, Extends: o | class | a, toFloat() round([n]) getPrevious([match]) container: el, removeEvents([e]) Object: Element.Properties Implements: o, trim() times(fn [, bn]) getAllPrevious([match]) fireEvent(e [, args, delay]) params: swfParams, send [, Request opt] properties: o, initialize: fn (=constructor) rgbToHex(returnArray?) toInt(), toFloat() getNext([match]) cloneEvents(from el [, type s]) vars: o, implement(o) hexToRgb(returnArray?) Methods from ‘Math’ getAllNext([match]) Type: Element Object: Element.Events events: o abs, acos, asin, atan2, ceil, cos, getFirst([match]) send([url s]) (only on <form>) Class.Extras Type: Function Element.Events.key = o } exp, floor, log, max, min, pow, sin, getLast([match]) Class: Chain Function.from(m) o = { base: e, condition: fn, Object: Cookie swfParams = { sqrt, tan new Class({Implements: Chain}) Function.attempt(fn [, fn [, ...] ]) getParent([match]) onAdd: fn, onRemove: fn } Cookie.write(key s, value s [, opt]) allowScriptAccess: s, callChain([args]) attempt([args [, bn]) Type: Event getParents([match]) opt = { quality: high | medium | low, getSiblings([match]) Custom Events domain: s, path: s, swLiveConnect: remoteScripting?, chain(fn [, fn [,...] ]) bind([bn [, args] ]) new Event([e [, win] ]) mouseenter getChildren([match]) wMode: s clearChain() delay([ms [, bn [, args] ] ]) Properties mouseleave duration: n, secure: b? } extend(key s, value m) alt, client.x, client.y, code, control, toQueryString() mousewheel } Class: Events Swiff.remote( mySwiff o, fn implement(key s, value m) key, meta, page.x, page.y, shift, getSelected() (only on <select>) Cookie.read(key s) new Class({Implements: Events}) Element.Dimensions [, arg, arg, ...]) pass([args [, bn]) relatedTarget, rightClick, target, getProperty(s) Cookie.dispose(key s [, opt]) addEvent(s, fn [, internal?]) wheel getProperties(s [,s [, ...] ]) Type: Element periodical([ms [, bn [, args] ] ]) WindowEvent: domready Class: Slick (Selectors) addEvents(o, fn [, internal?]) ‘key’ can be: setProperty(s, val) getCoordinates() domready ‘Slick’ engine FTW! fireEvent(s [, args, delay ms]) replace: bindWithEvent enter, up, down, left, right, tab, setProperties( {s: val, ...} ) getOffsetParent() the all time favourite ;) https://github.com/mootools/slick removeEvent(s, fn) myEl.addEvent(“click“,function(e){ space, backspace, delete, esc removeProperty(s) getPosition(relative el) removeEvents([s]) myFunction.bind(bn [, e]) preventDefault() removeProperties(s [,s [, ...] ]) setPosition( {x: posX, y: posY} ) o ~ Object e ~ Event bn ~ Element to bind ‘this’ }) s ~ String fn ~ Function [ ] ~ optional Class: stop(), stopPropagation() store(s, val) getScroll(), getScrollSize() Options a ~ Array el ~ Element | ~ choice / or getSize() new Class({Implements: Options}) replace: run Object: Event.Keys retreive(s [, default m]) n ~ Number el a ~ Array of el ms ~ Milliseconds setOptions([opt]) myFn.apply(bn, arg) Event.Keys.key = keyCode eliminate(s) scrollTo(x,y) ? ~ Boolean m ~ mixed match ~ CSS Selector Fx.Transitions Class: Fx.Scroll Module: Types Type: Date Info: Date.format Module: Request mootools FX/More Class: Fx new Fx.Scroll(el, opt) Array.Extras (Type: Array) get(key) format(format) Class: Request.Periodical adds possibility to use transition opt = { all opt from Fx + min() set(key, val) / set({key: val}) extends Request, Request.HTML Full CheatSheet for Javascript keys: (“%key %key2%key3”) offset: {x: n, y: n}, key = Date, Day, FullYear / year, & Request.JSON Framework mootools 1.3 option as string e.g. ‘bounce:out’ max() a short day (“Mon”, “Tue”) overflown: a, Hours / hr, Milliseconds / ms, opt = { all opt from Request + by mediavrog.net/blog/ average() A full day (“Monday”) Object: Fx.Transitions wheelStops: wheelStopsTrans? Minutes / min, Month / mo, initialDelay: ms, shuffle() b short month (“Jan”, “Feb”) Linear, Quad, Cubic, Quart, } Seconds / sec, Time, UTCDate, delay: ms, Class: FX sum() B full month (“January”) UTCFullYear, UTCHours, limit: ms new Fx(opt) Quint, Pow, Expo, Circ, Sine, set(x, y) c full date to string (“Mon Dec unique() UTCMilliseconds, UTCMinutes, opt = { Back, Bounce, Elastic start(x, y) 10 14:35:42 2007”) } reduce(fn [, firstCallVal m]) UTCMonth, UTCSeconds fps: n (default: 50), each has easIn,easeOut,easeInOut toTop(), toBottom() d date to two digits (01, 05, ...) startTimer(m) reduceRight(fn [, firstCallVal m]) for ‘get(key)’ key may also be: unit: false | px | em | %, toLeft(), toRight(), e date as one digit (1, 5, 12, ...) stopTimer() Class: Fx.Transition fn(previousVal, currentVal, i, a) TimezoneOffset, Week, Timezone, link: ignore | cancel | chain, toElement(el) H hour to two digits / 24h (00 - 24) new Fx.Transition(trans [, opt]) GMTOffset, Ordinal, DayOfYear, Class: Request.Queue duration: ms | short | normal | long, String.Extras (Type: String) I hour as decimal / 12h (01 - 12) LastDayOfMonth, UTCDay, AMPM new Request.Queue(opt) transition: Fx.Transitions, mootools More Class: Drag j day of the year to three digits pad(length, padString, dir) opt = { onStart(fxInstance), clone() (001 - 366, is Jan 1st) From here on you will find new Drag(el, opt) dir = left | right | both stopOnFailure: b?, onComplete(fxInstance), increment(resolution, times n) k hour / 24h as a digit (0 - 23) some selected plugins from opt = { repeat(times n) autoAdvance: b?, onCancel(fxInstance), decrement(resolution, times

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us