oQuery API

선택자 o('Element')

이벤트핸들러 .on('EventHandler', Function);

-소스-----------------------------------------------
o('.a').on('click',function(){alert('테스트완료');});
-데모-----------------------------------------------


인덱스값 .g[IndexValue]

-소스-----------------------------------------------
o('.b').g[0].on('click',function(){alert('테스트완료');}); o('.b').g[1].on('click',function(){alert('Tset Completion');});
-데모-----------------------------------------------


클래스존재여부 .hc('ClassName');

-소스-----------------------------------------------
o('.c').on('click',function(){if(!this.hc('o')){alert('테스트완료');}else{alert('Tset Completion');}});
-데모-----------------------------------------------


클래스추가 .ac('ClassName');

-소스-----------------------------------------------
o('.d').on('click',function(){this.ac('a');});
-데모-----------------------------------------------


클래스삭제 .rc('ClassName');

-소스-----------------------------------------------
o('.e').on('click',function(){if(!o('.e').hc('a')){this.ac('a');}else{this.rc('a');}});
-데모-----------------------------------------------


요소 스타일 display값 .dis('DisplayValue');

-소스-----------------------------------------------
o('.f').g[0].on('click',function(){this.dis('none');}); o('.f').g[1].on('click',function(){o('.f').dis('block');});
-데모-----------------------------------------------


요소 삭제 .x();

-소스-----------------------------------------------
o('.g').on('click',function(){this.x();});
-데모-----------------------------------------------


요소 내용변경 .html('Tag');

-소스-----------------------------------------------
o('.h').on('click',function(){this.html('테스트<br/>완료');});
-데모-----------------------------------------------


요소추가 .ap('createElement');

-소스-----------------------------------------------
o('.i').on('click',function(){var a =document.createElement('div');a.html('test');o('#test').ap(a);});
-데모-----------------------------------------------