티스토리 뷰

Old

Mootools 1.11 에서 Mootools 1.2 로 전환

Bravo(브라보) 2008. 11. 28. 01:27

기존 1.11 버전에서 이름을 날리던 plugin들이 1.2에서 작동하지 않는 경우가 많아서 필요에 따라 고쳐써야 할 경우가 생겼는데, 어떻게해야 될지 막막했으나 검색해보니 나오네...

출처 : http://github.com/mootools/mootools-core/wikis/conversion-from-1-11-to-1-2

* Element

Mootools 1.11»Mootools 1.2
el.getTag( )el.get('tag')
el.setHTML(string|array)el.set('html',string|array)
el.getText( )el.get('text')
el.setText( )el.set('text',string)
el.setOpacity(number)el.set('opacity',number)
el.remove( )el.dispose( )
el.replaceWith(element)element.replaces(el)
// note:inverts positions of element and el
el.effects(obj)new Fx.Morph(el, obj)
$E(selector)document.getElement(selector)
$ES(selector)document.getElements(selector)

* Array

Mootools 1.11»Mootools 1.2
[ ].copy(start, length)removed in favour of $A and [].slice
[ ].remove(item)[ ].erase(item)
[ ].merge([ ])[ ].combine([ ])

* Function

Mootools 1.11»Mootools 1.2
fn.bindAsEventListener(object, array)removed, since every addEvent callback has an event

* Class

Mootools 1.11»Mootools 1.2
var myClass = new Class({
...
});

myClass.implement(new Options);
myClass.implement(new Events);
var myClass = new Class({
Implements : [Options,Events],
...
});

* Ajax

Mootools 1.11»Mootools 1.2
$('myform').send([options]);$('myform').set('send',[options]).send();
new XHR({[options]}).send(url[, datastring]);new Request({'url':url[, options]}).send([datastring]);

* Cookie

Mootools 1.11»Mootools 1.2
Cookie.set(key, value[, options]);Cookie.write(key, value[, options]);
Cookie.get(key)Cookie.read(key)
Cookie.remove(cookie[, options]);Cookie.dispose(cookie[, options]);

* Json

Mootools 1.11»Mootools 1.2
Json.evaluate(string)JSON.decode(string, secure)
Json.toString(mixed)JSON.encode(mixed)

* Extending

Mootools 1.11»Mootools 1.2
Element.extend(object)/String.extend(object)String.implement(object)/String.implement(string, function)
window.extend(object)/document.extend(object)Window.implement(object)/Document.implement(string, function)

* Effects

Mootools 1.11»Mootools 1.2
new Fx.Style(element, property [, options]).start([from,] to);new Fx.Tween(element [, options]).start([property], from[, to]);
$(element).effect(property [, options]).start([startvalue,] endvalue); $(element).get(property [, options]).start(startvalue[, endvalue]);

* Plugins

Mootools 1.11»Mootools 1.2
new Drag.Base(el[, options]);new Drag(el[, options]);

'Old' 카테고리의 다른 글

Roar - 자바스크립트 메시지 알림 (Growl 처럼)  (1) 2009.01.11
syntaxhighlighter 티스토리에서 사용하기  (1) 2008.12.05
Delta Force: Angel Falls  (1) 2008.11.26
SWFUpload v2.2.0 Beta 1 Released  (0) 2008.10.24
mootools 1.2.1 released  (0) 2008.10.22
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
글 보관함