Created
March 19, 2012 20:37
-
-
Save ashnur/2126897 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var z,y,i; | |
var i =-100; | |
function Obiekt(z,y,t,iddiv) { | |
var self = this; | |
self.ruch = function() { | |
++i; | |
$(iddiv).css('left', ($("#punkt").position().left)+i);//I want send var. indiv in place on orbita1 | |
$(iddiv).css('top', ($("#punkt").position().top) + (Math.round(Math.sqrt((1-Math.pow(i,2)/Math.pow(z,2))*Math.pow(y,2)))));//I want send var. indiv in place on orbita1 | |
} | |
self.start = function() { | |
setInterval( self.ruch , 300 ); /* Why not {setInterval('self.ruch',300) */ | |
} | |
} | |
var pierwszyObiekt = new Obiekt(100,100,4,'#orbita1'); | |
pierwszyObiekt.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment