If I were trying to do this using HTML 4 DOM, I'd use the style.top attribute to move the interior block slowly up by subtracting a small amount from it over time. I'd use the window.setInterval method to generate a stream of events as a time base. Perhaps jQuery has a built in "move element" function you could use, just like the fadeOut method you are already using.
I wrote an arcade game I called "Space gravel"--> http://www.dst-corp.com/james/Asteroids/
It uses HTML 4 DOM with JavaScript sprites to move the images around the screen.
Finally, in the CSS section of your fiddle, you have a class name "#groundDiv". Me thinks you want this to be ".groundDiv" (pound symbol becomes period)
Happy fiddling...
On Sunday, April 14, 2013 11:10:20 AM UTC-4, Serendipity wrote:
--I have created a elevator functionality [there are 2 floors and corresponding to each one , there is a checkbox. Depending upon which checkbox is checked, the elevator shud move to that floor.
Couple of things which i'm not sure how to implement are:
wherever i have added class "unchecked" dynamically, the element looks as if it is not clickable. How do i make it clickable?
How to slow down speed of the Orange color elevator when it moves and stops at levels
where checkbox is checked?The fiddle is available at : http://jsfiddle.net/
hurricaneankit/rJ4Py/12/
You received this message because you are subscribed to the Google Groups "JavaScript Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javascript-information+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.