homepage Welcome to WebmasterWorld Guest from 54.237.38.30
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
JS degrade nicely plus transition issues - scrolling slides
barricades



 
Msg#: 4492756 posted 7:05 pm on Sep 8, 2012 (gmt 0)

I'm trying to create a javscript scroller following the example at: [deadmarshes.com...]

Unfortunately this version doesn't show anything when javascript is disabled but I'd like it to at least show the first image and caption and then just not move.

I stuck together a fiddle

[jsfiddle.net...]

Does anyone know how to make the initial transition not happen and just have the first 'slide' there?

Also I adapted this slightly to show 4 slides instead of 3. I changed 3 to 4 in two places in the JS (where it's keeping tally) and that seemed to work alright but now in FF when you click on a few of the numbers to change slides a few times then let it go back to normal running, the indicator which is meant to show which slide you're on starts appearing all over the place. The timing of the transitions also goes weird. It's like clicking a couple of times means the transitions and the pointers are going a couple of times. IE there's more than one bit of JS moving the slides and pointers, resulting in strangly timed transitions and more than one pointer. Could that be possible?

I assume that's to do with the way it's being counted in the JS but I haven't a clue what it's doing to be honest.

Any help would be appreciated.

 

daveVk

WebmasterWorld Senior Member 5+ Year Member



 
Msg#: 4492756 posted 12:25 am on Sep 10, 2012 (gmt 0)

<div id='tmpSlide-1' class='tmpSlide'
style='display:block'>

may help where js disabled

barricades



 
Msg#: 4492756 posted 10:04 am on Sep 10, 2012 (gmt 0)

Hey there, thanks for the reply. Yeah, I've since figured that bit out but I'm still stuck with how when you click one of the indicators then when transitions resume they aren't at regular intervals and there is often more than one indicator active at the same time.

any ideas?

lucy24

WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



 
Msg#: 4492756 posted 4:30 pm on Sep 10, 2012 (gmt 0)

:: peering into crystal ball ::

Fine-tooth-comb your variable names, especially the ones that are recycled between one function and another, or reused in different parts of the same function.

Sometimes when setting things up I'll start out making everything global, and then shift them one by one to local to make sure there's no contamination.

barricades



 
Msg#: 4492756 posted 11:36 pm on Sep 10, 2012 (gmt 0)

Crickey, thanks for the response but I'm not sure I understand what to do with it, can you be any more specific? I really appreciate any help :)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved