I have to slide an element from one point to another.... and it has to slide in exactly 0.24 secs. from one pt to another... ;-o )
but I'll be happy if I just get it to slide for now...;-)
Is there any reason you don't want to use jQuery for this?
Animation is one area where jQuery excels and makes a developper's life much easier.
You can also build a custom version of jQuery and just pull in the animation functionality if it is size you are worried about.
it's for a test.. they insist on plain JS... (sigh...)
but well, there was a time constraint, I had to hand in already.. but that's ok... if I can I want to figure out if I can do it over the weekend, and maybe just send it to the guy again anyway...
and of course you're right, I'm sure in real life no one in their right mind would do stuff like this with with JS...
the JS issue is slowly getting frustrating for job-seekers... a few years ago we all had to learn at least jQuery, and some other libraries (I only know jQuery....) they were all the rage, and you had to know them...
now they're going back to, oh but well, you do need to know how to do all this complicated with plain JS too, of course... it's getting ridiculous... and some job descriptions contain a mind-boggling amount of JS libraries, some weird ones I've never even heard of..... (and they do know they will never find someone who knows all of them...)
in my particular experience, every single place where I have worked in the last 4 years or so, they have used nothing but jQuery, absolutely nothing else...
thank you for your response... have a good weekend....
I'm off to bed now, so sorry for the short reply.
Maybe it it'll help.
Let us know how you get on.
on the contrary, Pullo.... thank you for your response.... I will look @ url you posted.....
gute Nacht.... schlaf gut....:-)
actually in case you're curious, here are the JS instructions:
a) When I click on the "Swap Vertical" button, the two buttons swap vertical positions in 0.24 seconds. (i.e., the bottom button moves up and the top button moves down, but both buttons retain their horizontal position.)
b) When I click on the "Swap Horizontal" button, the two buttons swap horizontal positions in 0.24 seconds.
c) The button animations should accelerate at the beginning, and should not decelerate at the end.
"accelerate"??? man, I had never even heard of "accelerating" elements with JS.....;-o
(accelerate "at the beginning".... only at the beginning... and yeah, I'll make sure I don't "decelerate" at the end....;-) man, anyone would think they write computer games or something, but they don't, they just do corporate websites...;-)
thank you very much, felgal...
yes I know jQuery is not a separate language... I know exactly what it is.....;-) and when I try to do hard stuff in plain JS I realize how much goes on "behind the scenes" in jQuery (& other libraries too, I suppose.....)
thank you very much for the url you posted.... I can't now, but I will it check it tomorrow for sure....
thank you... have a good day....
Is it really that bad? :lol: [/ot]
If you've used to jQuery, you would have heard of accelerating and decelerating As the term "easing".
There's a good suite of easing demos over at http://jqueryui.com/effect/#easing
yes of course I have used "easing" in jQuery (mosly in conjunction with cycle plugin (there's an "easing" plugin with all sorts of transition effects...)
Sure is! I would use jQuery to brush my teeth if I could. Everything else is just pain and agony. :)[/ot]
Back on topic: how did you get on, Maya?
@felgall ; your demo didn't work for me in the latest Chrome.
The text just sits there, when I'm guessing it should move.
There are a series of tutorials there that show step by step how to build an animation script. The element in the first tutorial doesn't move - that tutorial is just showing how to build an independent element that can be made to move.
Oh ok. Sorry!
I just looked at the source, saw this:
var anim = new $O('myobj');
and thought I had missed something.
This topic is now closed. New replies are no longer allowed.