Koala :
Welcome to Koala.
Koala is a real minimal javascript framework for hybrid mobile aplications.
History :
I wrote koala.js for my hybrid mobile application in short time. You know, modern frameworks like jquery registers many events in dom. Effects, events and other some methods are uses high cpu and memory recources. If you are developing mobile apps based on cordova - phonegap, you have to optimize your apps memory and cpu usage.
Koala works for simple actions(show,hide,select,fadeIn..) with low recource(cpu,memory) usage and not includes any other framework.
Koala has very simple code and many lost features then other complex frameworks.
Functions :
- get(query) : single dom element (works with native dom selectors)
- getAll(query) : return NodeList inculedes all elements for query (works with native dom selectors)
- show(target) : show dom element (display:block)
- hide(target) : hide dom element (display:none)
- fadeIn(target,delay) : show element with fadeIn effect
- fadeOut(target,delay): hide element with fadeOut effect
- inArray(arr,value) : check given value is in given array
Events:
- click(target, Callback) : set click listener for given dom element
- event(eventname, target, Callback) : set listener to given event for given dom element
Basic Usage:
Getting Single Element
koala.get("div#container");
koala.get("div#container a");
var elm = koala.get("div#container");
Getting All Elements For Query
koala.getAll("div a");
var elmNodeList = koala.getAll("div a");
Show Hidden Element
koala.show(elm);
Hide Element
koala.hide(elm);
Show element with fadeIn effect
koala.fadeIn(target, 300);
Hide element with fadeOut effect
koala.fadeOut(target, 300);
Search Value in Array
var arr = Array("banana","apple","pie","wine");
koala.inArray(arr, "wine");
Set Click Event
koala.click(elm, function({
console.log("Koala Click");
}));
Set listener to given event for given dom element
koala.event("mousemove", elm, function(){ console.log("Koala Event") });