Ask your JavaScript questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

scrolling div with an auto-pause of 2 seconds per 16 records. JavaScript


I would like to have a scrolling div with an auto-pause of 2 seconds per 16 items per screen. When the last item is reached (it also has a 5-second pause) the div scrolls to the top and the process repeats over and over. The scrolling aspect is difficult for me. Therefore you can use any script library plugin you choose, but its gotta work with a browser.

You've probably seen this in a doctors' office. Local drugstores have this for pharmacy prescriptions.

Explanation: First 16 <input> items display. Pause 2 seconds. Clear all inputs. List next 16 items. Clear all inputs. List next 16 items. Then repeat until all items are displayed. Then repeat first 16 <input> items.

I achieved the task of making the list. But I can't make it scroll. Maybe draw the first 16 items, pause 2 seconds, erase the input fields, and draw the next 16. Seems like drawing all 100 records and limiting the div height and scrolling is difficult.

ANY working solution is welcome.


<ul id="sortable"> <!-- create list of players-->


for ($i = 1; $i <= $limit; $i++) {
echo '<input class="ui-state-default" id = "I' .$i .'"';
echo '></input>';
print "\n";





function ratingSort() { $("input").css("border-color", "black");

for (i = 0; i <= <?php echo $limit; ?>; ) {

var fullRating = toSort[i].rate;

var Name = toSort[i].name.split(" "); var lastName = Name[0]; var firstName = Name[1];

var displayName = lastName +" " + firstName + " " + toSort[i].rate;

$("#I" + (i)).val(displayName);

colorize($("#I" + (i)), toSort[i].rate);


//if (i == 13) {$(l)[0].reset();}


//var done = false; var notre = 12; var num = 0;
//var data_size = <?php echo $limit; ?>;



Answers (0)

No answers yet.