Solved

Javascript Slideshow Troubleshooting

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Detecting robots? 5 35
addressing a specific html page 9 28
jqplot Pie Chart - javascript 2 17
Adjust the position 3 13
Read about why website design really matters in today's demanding market.
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…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

759 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

21 Experts available now in Live!

Get 1:1 Help Now