Randomly positioning an element via css with jquery -


is there reason

$("#cloud").top(100).left(100); 

doesn't work despite fact

$("#cloud").height(math.random()*55).width(math.random()*55); 

and

#cloud {     top:100px;     left:100px; } 

work fine?

top , left css properties, , should therefore assigned .css() function.

$("#cloud").css({     "top" : "100px",     "left" : "100px" }); 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -