GithubHelp home page GithubHelp logo

zxx.js's Introduction

zxx.js - A very small JavaScript library for simple pages

A small JS file, with the same API use as jQuery. Howerer, the number of the API is less a lot than jQuery. It's used for some simple pages. Why u r here?

I do like studying Web Front technology, so, natural, I have to make a lot of demos for comparing, testing or just for showing.
Generally speaking, these web pages are simple. Some pages without any JS, even if some pages have js code, this JS code is similar to ABC. For example, I click a button, then the background color of page turn red. The code will be:

button.onclick = function() {
	document.body.style.backgroundColor = "red";
};

So, easy! If we have many buttons which reflect to different background color according to the value of the "data-color" attribute, things will be a litte different. First of all, considering the compatible with IE6, IE7, we cant't select these buttons accurately by existing browser API(eg. document.querySelectorAll), we shoule select all buttons and filter them by className or other attribute. Secondly, we should loop these button elements for binding event of click. The JS code will be double and event more.

If there is only one page, it's just ABCDEFG. However, I often deal with these pages. You may say that you can use jQuery. Oh, come on guy, the size of the jQuery is as big as a pig, I don't think you would use anti-aircraft gun fight mosquitoes.
So, I need a simple JS library, with simple API, used for simple pages. It's the reason why I write zxx.js.

APIs~

Simple selector API, use "mini" Selector Engine.

eq, get, each, bind, click, css, attr, removeAttr, html, data, show, hide, hasClass, addClass, removeClass, val, append, extend, $.extend, $.type, $.isFunction, $.isArray.

License

What's this? 疑问

zxx.js's People

Stargazers

江龙 avatar

Watchers

James Cloos avatar 江龙 avatar

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.