View Full Version : URGENT help needed with a slideshow - Easy question

10-05-2012, 02:37 AM
Okay so here's the page.

As you can see, there are two slideshow controls. When I click both of them, the same image appears. When I click on them, I want it to be different images, like an actual slideshow.

The javascript as of now:

$('img#bg').attr( 'src', 'background.png' ).show();
$('#slideshow-caption').text( $('#slideshow-buttons img:first').attr( 'title' ) );
$('#slideshow-buttons img:first').attr( 'src', 'imgs/slideshow_page_selected.png' );
var selected = $('#slideshow-buttons img');

$('#slideshow-buttons img').each(function(){
if( selected == this )
return false;

var m_this = this;
$('img#bg').fadeOut( 'slow', function(){
$('#slideshow-caption').text( $(m_this).attr( 'title' ) );
$(selected).attr( 'src', 'imgs/slideshow_page.png' );
$(m_this).attr( 'src', 'imgs/slideshow_page_selected.png' );
selected = m_this;


Thanks much. Need some urgent help on this.

Philip M
10-05-2012, 08:33 AM
Prefer to show your relevant code. People are reluctant to open links offered by newcomers. Especially of the form

It is your responsibility to die() if necessary….. - PHP Manual

10-05-2012, 03:08 PM
Okay I've edited my first post. The code is there now.