Animating an image on a static background help
I am trying to create an animation on top of a static background image. I have the animation working properly and correctly but i can't seem to wrap my head around how to get it where i need it to be.
I want the image to be placed document.image[4].src as its animating in order to be in the correct position on the webpage.
Any input would be greatly appreciated, rather new to this.
Animating Code portion in <head>
- <script type="text/javascript">
- function slideSwitch() {
- var $active = $('#slideshow IMG.active');
- if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
- // use this to pull the images in the order they appear in the markup
- var $next = $active.next().length ? $active.next()
- : $('#slideshow IMG:first');
- $active.addClass('last-active');
- $next.css({opacity: 0.0})
- .addClass('active')
- .animate({opacity: 1.0}, 1, function() {
- $active.removeClass('active last-active');
- });
- }
- $(function() {
- setInterval( "slideSwitch()", 75 );
- });
- </script>
Code portion in <body>
- <div id="slideshow">
- <img src="images/car0.gif" alt="Image 0" class="active" />
- <img src="images/car1.gif" alt="Image 1" />
- <img src="images/car2.gif" alt="Image 2" />
- <img src="images/car3.gif" alt="Image 3" />
- <img src="images/car4.gif" alt="Image 4" />
- <img src="images/car5.gif" alt="Image 5" />
- <img src="images/car6.gif" alt="Image 6" />
- <img src="images/car7.gif" alt="Image 7" />
- <img src="images/car8.gif" alt="Image 8" />
- <img src="images/car9.gif" alt="Image 9" />
- <img src="images/car10.gif" alt="Image 10" />
- </div>