Melody Scott
asked on
Spacing of javascript slide show in FF good, in IE not good
Hi- below is the code I'm using on this page:
s50.funeralhomewebhosting. com/index. php?
The absolute position used on slideshow IMG positions the images correctly on Firefox 12.0, but doesn't move them at all in IE9. IS there something else I can add that will accomplish the same positioning on IE? Thanks!
<script type="text/javascript" src="/includes/jquery-1.4. 2.min.js"> </script>
<script type="text/javascript">
function slideSwitch() {
var $active = $('#slideshow IMG.active');
if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
var $next = $active.next().length ? $active.next()
: $('#slideshow IMG:first');
$active.addClass('last-act ive');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('activ e last-active');
});
}
$(function() {
setInterval( "slideSwitch()", 5000 );
});
</script>
<style type="text/css">
#slideshow { position:relative; height:390px; }
#slideshow IMG { position:absolute; top:0; left:-15; z-index:8; opacity:0.0; }
#slideshow IMG.active { z-index:10; opacity:1.0; }
#slideshow IMG.last-active { z-index:9; }
</style>
<div id="slideshow">
<img src="/siteimages/rse/1.jpg " alt="" class="active" />
<img src="/siteimages/rse/2.jpg " alt="" />
<img src="/siteimages/rse/3.jpg " alt="" />
</div>
s50.funeralhomewebhosting.
The absolute position used on slideshow IMG positions the images correctly on Firefox 12.0, but doesn't move them at all in IE9. IS there something else I can add that will accomplish the same positioning on IE? Thanks!
<script type="text/javascript" src="/includes/jquery-1.4.
<script type="text/javascript">
function slideSwitch() {
var $active = $('#slideshow IMG.active');
if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
var $next = $active.next().length ? $active.next()
: $('#slideshow IMG:first');
$active.addClass('last-act
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('activ
});
}
$(function() {
setInterval( "slideSwitch()", 5000 );
});
</script>
<style type="text/css">
#slideshow { position:relative; height:390px; }
#slideshow IMG { position:absolute; top:0; left:-15; z-index:8; opacity:0.0; }
#slideshow IMG.active { z-index:10; opacity:1.0; }
#slideshow IMG.last-active { z-index:9; }
</style>
<div id="slideshow">
<img src="/siteimages/rse/1.jpg
<img src="/siteimages/rse/2.jpg
<img src="/siteimages/rse/3.jpg
</div>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much, and DUH!! I knew that about 15px, what is wrong with me?
I'll work on it right now.
I'll work on it right now.
ASKER
Perfect answer!
left: -15;
It should be
left: -15px;