Solved

Javascript Slideshow Troubleshooting

Posted on 2010-11-23
4
567 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

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!

Question has a verified solution.

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

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

749 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