On my page I have a DIV that uses a PHP query to return results from a MYSQL table. The items being returned are being shown as IMAGE CHECKBOXES (images that funtion as checkboxes, See sample code below...)
echo "<input type=\"checkbox\" name=\"veggies[]\" id='",$rows['itemname'],"' value='",$rows['displayname'],"' class=\"css-checkbox\" />";
echo "<label for='",$rows['itemname'],"' id='",$rows['itemname'],"' class=\"css-label\"> <img src='",$rows['imagepath'],"' /></label> ";
I have my page layout to show 9 of these images at a time. If the # of records returned in more than that, It will cause the DIV to scroll vertically so you can see more records.
HERE IS MY ISSUE:
I have created SCROLL DOWN and UP buttons so you can scroll down to exact positions that will show records that overflow past the div dimensions. After scrolling vertically to show records and Choose the record at the TOP-LEFT (Remember they are actually checkboxes), the DIV automatically reverts vertical scroll position back to the top of DIV.
Is there a way in either CSS or Javascript to prevent scroll position from being lost or reset?
Aucun commentaire:
Enregistrer un commentaire