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
Post a Comment