Solved

Javascript Slideshow Troubleshooting

Posted on 2010-11-23
4
568 Views
Last Modified: 2012-05-10
It's in wordpress. Here's my CrossSlide slideshow code:

Here's Crosslide: http://tobia.github.com/CrossSlide/

In my head tag, I've got

<script type="text/javascript" src="/wp-content/themes/twentyten/js/jquery.min.js"></script>
<script type="text/javascript" src="/wp-content/themes/twentyten/js/jquery.cross-slide.js"></script>

In my stylesheet.css, I've got:

#slideshow {
  width: 496px;
  height: 308px;
}

In a new page in Wordpress I've got the attached code.

All of the files are uploaded to that "js" subdirectory.

What am I doing wrong?

<div id="slideshow">
<script type="text/javascript">
  $(function() {
    $('#slideshow').crossSlide({
      sleep: 5,
      fade: 1
    }, [
      { src: '/wp-content/themes/twentyten/js/1.jpg' },
      { src: '/wp-content/themes/twentyten/js/2.jpg' },
      { src: '/wp-content/themes/twentyten/js/3.jpg' },
      { src: '/wp-content/themes/twentyten/js/4.jpg' }
      { src: '/wp-content/themes/twentyten/js/5.jpg' },
      { src: '/wp-content/themes/twentyten/js/6.jpg' },
      { src: '/wp-content/themes/twentyten/js/7.jpg' }
    ])
  });
</script>

</div>

Open in new window

jquery.cross-slide.js
jquery.min.js
0
Comment
Question by:weikelbob
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:DigitalTyrant
ID: 34201413
You'll want the <script> tag to be below the <div></div> tags.
0
 
LVL 7

Author Comment

by:weikelbob
ID: 34201446
Did that. Thanks.

Still not working

I'm not even sure my downloaded javascript files are in the correct form, I'm not used to javascript.
0
 
LVL 4

Accepted Solution

by:
DigitalTyrant earned 500 total points
ID: 34201466
As long as you have not edited it, those js files are functional.  

on the lines where you declare the img src,
      { src: '/wp-content/themes/twentyten/js/1.jpg' },
try
      { src: '1.jpg' },

What browser are you using?
0
 
LVL 7

Author Comment

by:weikelbob
ID: 34201570
Got it, there's no comma at the end of line 11 above.

Thanks for your help.
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question