There is a certain list of images, which is divided into a number, and subsequently displayed in the form of a "carousel".
<div> <img src="img1.jpg" /> <img src="img1.jpg" /> <img src="img1.jpg" /> </div> <div> <img src="img1.jpg" /> <img src="img1.jpg" /> <img src="img1.jpg" /> </div> <div> <img src="img1.jpg" /> <img src="img1.jpg" /> </div>
And there is the possibility of removing these photos. Tobish, click on the desired photo, click the delete button, and it is deleted. But the fact is that if you delete somewhere in the middle of the list, there will be a space between these photos. We must remove it. that is, to do so to say, sorting, so that it does not:
<div> <img src="img1.jpg" /> <img src="img1.jpg" /> <img src="img1.jpg" /> </div> <div> <img src="img1.jpg" /> <img src="img1.jpg" /> </div> <div> <img src="img1.jpg" /> <img src="img1.jpg" /> </div>
and something like:
<div> <img src="img1.jpg" /> <img src="img1.jpg" /> <img src="img1.jpg" /> </div> <div> <img src="img1.jpg" /> <img src="img1.jpg" /> <img src="img1.jpg" /> </div> <div> <img src="img1.jpg" /> </div>
Who has any ideas? :)