hello
i got stuck in my project please help me
i want to slideshow image that saved in directory and image name save in database.

i want to add a link for every image in slide but it didn't work.slideshow is ok without link
but when i add link then only 1 image show as slide.
what to do.
here my code
PHP Code: 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</script>
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"/>

<title>Simple jQuery Slideshow from JonRaasch.com</title>

<script type="text/javascript" src="jquery-1.2.6.min.js"></script>

<script type="text/javascript">

/*** 
    Simple jQuery Slideshow Script
    Released by Jon Raasch (jonraasch.com) under FreeBSD license: free to use or modify, not responsible for anything, etc.  Please link out to me if you like it :)
***/

function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');

    // uncomment the 3 lines below to pull the images in random order
    
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );


    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 5000 );
});

</script>

<style type="text/css">

/*** set the width and height to match your images **/
#slideshow {
    position:relative;
    height:250px;
}

#slideshow IMG {
    position: absolute; 
    top:0;
    left:0;
    z-index:8;
    opacity:0.0;
}

#slideshow IMG.active {
    z-index:10;
    opacity:1.0;
}

#slideshow IMG.last-active {
    z-index:9;
}

</style>
</head>

<body>
<!-- this will work with any number of images -->
<!-- set the active class on whichever image you want to show up as the default 
(otherwise this will be the last image) -->

<div id="slideshow">
   <?php
error_reporting
(E_ALL);
 include(
"notice/config.php");
$query "SELECT id, title,body,name FROM notice";
$result mysql_query($query);
$num mysql_num_rows($result);
while (
$row mysql_fetch_assoc($result))
{  
echo
"<a href='#'><img src=\"../ckfinder/userfiles/images/" $row['name'] .' "\" alt=\"\" /></a>';
}
?>
</div>
</body>
</html>
please help me
shakac Reviewed by shakac on . need help to add link in image slide hello i got stuck in my project please help me i want to slideshow image that saved in directory and image name save in database. i want to add a link for every image in slide but it didn't work.slideshow is ok without link but when i add link then only 1 image show as slide. what to do. here my code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Rating: 5