You are echoing the <img>
tags into the slider <div id="slider">
. They are all inside that div, and displayed.
You could add a style to initially hide them and then have your jquery loop show them one by one.
Also, you probably want to increase the id on each iteration.
Something like:
$i = 1; // no need for quotes here
foreach($images as $file){
if(!in_array($file, $ignore)){
$imageDisplay .= '<img style="display:none" id="'.$i.'" src="https://stackoverflow.com/questions/29675029/uploads/"
.$file.'" border="0"/>';
$i++;
}
}
2
solved Image uploader and slider