#Prelude
April 27, 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.
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.
- Function animation
- Function document.ready
- Homepage and documentes
- Funtion children
- Function parents