Giter VIP home page Giter VIP logo

koala's Introduction

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") });

koala's People

Contributors

rnglab avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

alperbek

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.