Solved

Javascript Slideshow Troubleshooting

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
The viewer will learn how to count occurrences of each item in an array.
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.

911 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now