Uploading reviews to the website, how to do?

On the website you need to make the reviews block in the following way.
1. When you download website there is only 3 reviews. The rest did not load.
2. Under the reviews button "More comments", which when pressed there is 3 review.
3. Each click adds 3 opinion. All reviews will be no more than 30.
4. When reviews zakanchivayutsya, the button "More reviews" disappears.
5. There is another button under the reviews, next to the "More reviews", is called "Hide comments".
6. When you click on the "Hide reviews" close all newly opened reviews, be the first three.
7. Also, if you hide all reviews, page skrollitsya before the start of the block.
Half I have some idea how to do it, but all the same as on what technology is better?
Scripts perhaps some are ready for this solution?
July 2nd 19 at 14:16
2 answers
July 2nd 19 at 14:18
1. From dB prograame 4 records if of 4, the output of three krepkoy, otherwise no button
2. With offsets, select the desired interval and do the same as 1 item
3. Check the offset.
4. On the server browser pass the flag about the end of the reviews.
5. css: display:none
6. Uploaded reviews put in a separate block
7. Try window.location.hash.
July 2nd 19 at 14:20
To load fit is infiniteajaxscroll, and to hide the blocks most likely hands you can write a function.

Find more questions by tags PHPHTMLCSSjQueryWeb Development