Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function animation(){
- this.interval = false,
- propSet = false,
- start = 0,
- end = 0,
- time = 0,
- style = '';
- this.setProps = function(oProps){
- for(varName in oProps){
- this[varName] = oProps[varName];
- }
- propSet = true;
- }
- this.readProp = function(prop){
- return this[prop];
- }
- if(!this.interval) this.interval = setInterval(function(){}, 50);
- };
- var a = new animation();
- a.setProps({
- 'start' : -21,
- 'end' : 0,
- 'time' : 3,
- 'style' : 'top'
- });
- console.log(a.readProp('propSet'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement