Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 573
  • Last Modified:

Javascript Slideshow Troubleshooting

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
weikelbob
Asked:
weikelbob
  • 2
  • 2
1 Solution
 
DigitalTyrantCommented:
You'll want the <script> tag to be below the <div></div> tags.
0
 
weikelbobAuthor Commented:
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
 
DigitalTyrantCommented:
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
 
weikelbobAuthor Commented:
Got it, there's no comma at the end of line 11 above.

Thanks for your help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now