Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-16-2013, 01:24 AM   PM User | #1
BlackReef
Regular Coder

 
Join Date: Apr 2010
Posts: 188
Thanks: 96
Thanked 1 Time in 1 Post
BlackReef is an unknown quantity at this point
Simple Slideshow keeps flickering between slides..?

***Issue has been resolved****


You can view the slideshow here:

http://tinyurl.com/cg7mrm9

It appears fine at first, but after awhile - the slides start 'flickering' back and forth.

Here is the code:

Code:
<style>
.fadein { position:relative; width:990px; height:335px; }
.fadein img { position:absolute; left:0; top:0; }

</style>

<script>
$(function(){
    $('.fadein img:gt(0)').hide();
    setInterval(function(){
      $('.fadein :first-child').fadeOut()
         .next('img').fadeIn()
         .end().appendTo('.fadein');}, 
      4500);
});
</script>


<div id="content" style="background:#540000;">
	<div id="homeFlash" style="background:#540000;">

<div class="fadein">

(image paths - removed)

</div>

Last edited by BlackReef; 01-17-2013 at 11:49 PM..
BlackReef is offline   Reply With Quote
Old 01-16-2013, 05:41 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,387
Thanks: 18
Thanked 350 Times in 349 Posts
sunfighter is on a distinguished road
I have run this in FireFox ver 18 for over an hour and do not see the behavior your talking about. What browser and ver is giving you the trouble?
sunfighter is offline   Reply With Quote
Users who have thanked sunfighter for this post:
BlackReef (01-16-2013)
Old 01-16-2013, 09:45 PM   PM User | #3
BlackReef
Regular Coder

 
Join Date: Apr 2010
Posts: 188
Thanks: 96
Thanked 1 Time in 1 Post
BlackReef is an unknown quantity at this point
Yea, Im not quite sure how to replicate it, but it's happened on several differnt computers here in the office. It for sure happened on Firefox and Chrome, not sure about IE
BlackReef is offline   Reply With Quote
Old 01-17-2013, 12:29 AM   PM User | #4
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,468
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
i would use CSS instead of jQuery to do the animation: it runs on a lower lever and is typically MUCH smoother than the setTimout-based animation jQuery does...

all you need are some CSS transitions.
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.6% IE9:9.8% IE10:10%
rnd me is offline   Reply With Quote
Users who have thanked rnd me for this post:
BlackReef (01-17-2013)
Old 01-17-2013, 09:06 PM   PM User | #5
BlackReef
Regular Coder

 
Join Date: Apr 2010
Posts: 188
Thanks: 96
Thanked 1 Time in 1 Post
BlackReef is an unknown quantity at this point
Quote:
Originally Posted by rnd me View Post
i would use CSS instead of jQuery to do the animation: it runs on a lower lever and is typically MUCH smoother than the setTimout-based animation jQuery does...

all you need are some CSS transitions.
Thanks for the reply. My concern is older browsers not being able to view a CSS3 slideshow. Plus this code is almost there, I think a quick change can fix this.

I dont know how to replicate the issue, but here is what is happening:

BTW - is there a way to embed YouTube videos on here? Here is the link:

http://www.youtube.com/embed/lPGs8hmKYEk

[youtube_browser]lPGs8hmKYEk[/youtube_browser]
BlackReef is offline   Reply With Quote
Old 01-17-2013, 11:48 PM   PM User | #6
BlackReef
Regular Coder

 
Join Date: Apr 2010
Posts: 188
Thanks: 96
Thanked 1 Time in 1 Post
BlackReef is an unknown quantity at this point
I tried a different script, and it appears to be working fine now.

Thanks for your help guys,
-J
BlackReef is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:39 AM.


Advertisement
Log in to turn off these ads.