I have to put a empty div just inside the first to get the jquery tor run the image slider - which horizontally slides the “.slideImgDiv” that are inside div with the id.slider - If i’m using php/mysql to create the rest of them by calling the file names from an sql db. Should I not use php for this? and if not what should I use to generate them with out having to hardcode them everytime I add a new image.
the slider i’m working on can be seen at http://dsamajr.com – and just because it’s working doesn’t mean i have this issue fixed, i’m just testing the changes in a different file
<div id="slider" class="sliderMenu">
<div class="slideImgDiv"></div> // this is the div I have to use to allow it to work
<?php
$sql = "SELECT id, filename, linkto FROM imageScroller";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo "<div class='slideImgDiv'>";
echo "<img src='" . $row["filename"]. "' style='max-height:118px; max-width:1000px;' />";
echo "</div>";
}
} else {
echo "0 results";
}
$conn->close();
?>
</div>
</div>
I went ahead and tried the spans like you said and it works perfectly when I don’t use php to call the data from the db. But as soon as I connect to the db it stops working.