Coder Social home page Coder Social logo

octjs's Introduction

#Prelude

April 27 2013, a day I will never forget. I know what I really want, and I will fight for it desperately. A small javascript, written to remember the day I grew up.

Usage

Include the oct.js file in your HTML.

#Overview

  • .addEvent() Add event.
  • .add() Add id or class in a object.
  • Array.contain() Test for value in Javascript Array.
  • Mouse Events click, hover and so on
  • .getCss() Get the value of style properties for the element.
  • .getAttr() Get the value of attribute properties for the element.
  • .has() Select the object which has the specifical id, class or tag.
  • .hasAttr() Judge the element whether has the attribute property.
  • .height() Get or set height.
  • .html() Read and insert content.
  • Number.int() Get integer part of Number.
  • Obj.method() Extend method of basic types of objects.
  • Oct.ajax() Perform an asynchronous HTTP (Ajax) request.
  • Oct.browswer() Return the current browser name and version. Mainly chrome, firefox, etc.
  • Oct.cookie.read() Read cookies value by item name.
  • Oct.cookie.remove() Remove cookies by cookie item name.
  • Oct.cookie.set() Set cookies.
  • Oct.extend() Extend method of Oct object.
  • Oct.global.namespace() Creat namespace.
  • Oct.hexToRgb() Exchange HEX color to RGB color.
  • Oct.ieVerion() Test ie version.
  • Oct.inheFn() Inherit construct function. It should write inside the son class.
  • Oct.inhePro() Inherit prototype. It should write before the son class.
  • Oct.isArray() Check whether an element is an array.
  • Oct.isEmpty() Check whether a string is empty.
  • Oct.localStorage.read() Read localStorage value by item name.
  • Oct.localStorage.remove() Remove localStorages by localStorage item name.
  • Oct.localStorage.set() Set localStorages.
  • Oct.matrix() Create one or two- dimensional array.
  • O() or Oct() Create an Oct collection object by performing a CSS selector, wrapping DOM nodes, or creating elements from an HTML string.
  • Oct.mergeSort() Sort the Array through merge algorithm.
  • Oct.randomNum() Generate random number in specific range.
  • Oct.rgbToHexr() Exchange RGB color to HEX color.
  • Oct.sort.fn() Some sort method for javascript sort() function.
  • Oct.stopBubble() Cancle event bubbling.
  • Oct.tag() Create tag.
  • Oct.trim() Delete the space in the first and end of a string.
  • .parent() Get the first level of child nodes.
  • .remove() Remove id, class or tag in an object.
  • .removeAttr() Remove the attribute.
  • .setCss() Set css property.
  • .setAttr() Set attribute property.
  • .setOpacity() Set opacity.
  • .son() Get the first level of child nodes.
  • String.lengthdb() Count the double bytes words.
  • .width() Get or set width.

To do

  • Function animation
  • Function document.ready
  • Homepage and documentes
  • Funtion children
  • Function parents
  • Expand on() by event bubble to bind event dynamically

octjs's People

Contributors

younglaker avatar weakish avatar aomine-sama avatar yorkie avatar alwaysrunning avatar

Watchers

James Cloos avatar coco 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.