David Yang bio photo

David Yang

A graduate school student in Taiwan.

pingjing.yang@gmail.com Facebook Github

JS_NOTES

匿名函数

(function(parameter){content})(parameter);

function set

.toFixed(n_bit)
.hasOwnProperty(key)
console.log()

no block variable in js

all the var or method inside a object must be with this.

typeof xxx # get the type of xx
.hasOwnProperty("propertyname")

what inside class do not need to have var, this. is enough

classname.prototype.methodname =… # add new method to an existed class

inheritance in js newclass.prototype = new originalclass()

type should be in “ “, link “string”

inside class declaration this.property is public and var property is private

jQuery

keydown()
animate({action},latency)
css({'property':'parameter'...})
key and key.which
parseInt(key.which,10) # then manipulate key by int

jQuery UI

effect(' effect') # bounce, explode,slide
.accordion({collapsible: true, active: false});
.draggable
.reasizable()
.selectable()
sortable()
accordion()