How could I display visual feedback when looping through items in a database?

How could I display visual feedback when looping through items in a database?

I'm making an item picking system in which the user will click a button and it will retrieve an item from a database to be picked. Once picked, the user will click the button and it will go to the next item in the table. I wanted to show a sort of visual display or feedback as the user clicks through each time.

I'm making an item picking system in which the user will click a button and it will retrieve an item from a database to be picked. Once picked, the user will click the button and it will go to the next item in the table. I wanted to show a sort of visual display or feedback as the user clicks through each time.

Say there is 10 items that need to be picked I would have either a progress bar that increments each time until completion or even like a text indicator such as 1//10, 2/10, etc.

For reference I'll include my relevant code

Here is the js

<script >
var offset = 0;
$(document).ready(function() {
$('#button1').click(function(e) {
    $("#div1").empty();
    // pass offset value with GET request
    $.getJSON("getItem.php?offset=" + offset, function(result) {

offset++; // increment the value after sucessful AJAX call
$.each(result, function(i, field) {
    $("#div1").empty();
    $("#div1").append(JSON.stringify(result)); //alert(JSON.stringify(data));
});

}); }); }); </script>

and my php

mysqli_select_db($con,"orders");
$rows = null;
// Get the offset value
$offset = empty($_GET['offset']) ? 0 : $_GET['offset'];

$sql="SELECT * FROM orders Limit $offset, 1 "; // pass the offset value to LIMIT query

$result = mysqli_query($con,$sql); while($row = mysqli_fetch_assoc($result)) $rows[] = array_map('utf8_encode', $row);

echo json_encode($rows);

I've done some google searching but couldn't find any examples relevant to my idea, if someone knows how or could point to a solution of a problem similar to mine that would be greatly appreciated

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

How to Check Password Strength with JavaScript, CSS and jQuery

Password is most important way to secure your data.If password is weak in not so strong anybody can access your data it is very important to create a secure password wherever you need. In this post, we will create a Password Strength Checker using JavaScript,jQuery and CSS.

Building a minesweeper game using Javascript, HTML and CSS

In this article, you'll learn how to build minesweeper using JavaScript, HTML and CSS. I also used jQuery, a JavaScript library that is helpful for interacting with html. Whenever you see a function call with a leading dollar sign, that is jQuery at work

How to Create an autoplay Testimonial Slider with jQuery and CSS

How we can create a testimonial slider using jQuery and CSS? Solution: Responsive Testimonial Slider With jQuery and CSS, an Automated Slider which slides automatically.