?
Solved

Javascript Slideshow Troubleshooting

Posted on 2010-11-23
4
Medium Priority
?
571 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 2000 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

Command Line Tips and Tricks

The command line is a powerful tool at the disposal of every Linux user. Although Linux distros come with beautiful user interfaces, it's worthwhile to learn the command line because it allows you to do a number of things that you otherwise cannot do from the GUI.  

Question has a verified solution.

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

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

800 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