inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on Jan 19, 2016 4:42:06 GMT -8
You could use jQuery's animate method to move the text. seen here but that causes a problem. The animation is not based on speed but time, so the longer the text then the quicker it will scroll to finish in the allotted time, 20 seconds in my example. You could use some maths to divide the width by the time and multiply it by a variable (determined by the user) so that the speed is always the same, regardless of the length of it all. You can take my example in the link above and have a play around with it if you want. Try to see why I cloned the .marquee-content element (by removing it).
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,849
January 2015
msg
|
Post by Lynx on Jan 19, 2016 20:20:53 GMT -8
Thanks for the reply, Quozzo! Much appreciated. I'm actually working on a way to just get rid of that HTML <marquee> tag though and just use JS. There's pieces in my first version that should work with the new re-write (with some modifications, of course) that will (hopefully) solve all of my problems at once. I've just got to get them to play nicely together. I am looking at the CSS animation that you linked as well, so I do appreciate that. Going to give this idea a try first though and see where I may need to go from there.
|
|
inherit
216224
0
Aug 1, 2024 1:18:46 GMT -8
Quozzo
408
November 2014
quozzo
|
Post by Quozzo on Jan 19, 2016 23:59:18 GMT -8
I didn't use any CSS animations, although CSS3 animations is another route you can take. Mine is pure JS (well, jQuery )
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,849
January 2015
msg
|
Post by Lynx on Jan 20, 2016 21:59:52 GMT -8
My bad, Quozzo - I had meant the CSS3 animations that Peter had pointed out to me earlier in the thread. My apologies for any confusion.
|
|