HELP!
HELP!
I am very new to this, reasonably competent in HTML and CSS.
I need to change this from an 'on click' function, to automatically move every 4-5 seconds.
Whats more, if possible, I would like to change it further by having each object move back slightly then to accelerate off the screen instead of leave at a fixed rate of speed.
Is this possible?
- $('.box').click(function() {
- $('.box').animate( function() {
- if ($(this).offset().left < 0) {
- $(this).css("left", "150%");
- }
- });
- $(this).animate({
- left: '-50%'
- }, 500);
-
- if ($(this).next().size() > 0) {
- $(this).next().animate({
- left: '50%'
- }, 500);
- } else {
- $(this).prevAll().last().animate({
- left: '50%'
- }, 500);
- }
- });