0
I have a select that returns me 40 records. I want to initially print 10 of them and then create a button See more where you will expand the list by displaying 10 more items until I complete my total of 40 records and disappear as soon as I finish them all.
An example of this working button can be seen here on Mercado Livre at the end of questions to the seller.
I think what you are looking for is called "Paging", you can find it at http://answall.com/questions/26303/como-fazer-pagina%C3%A7%C3%A3o-php-e-mysql.
– Inkeliz
not quite that no, everything will be displayed on the same page... I just don’t want to load everything at once in case the user doesn’t want to read. but if interested you can click the button and will show more things every time you click... you can see an identical example of what I want in the free market link I posted, in the part where displays the questions to the seller
– Alexandre Galvão Alves
The free market carries ALL questions at once, at least on this link! All "hidden" questions are with the class
ch-hide
. When you click on "See more questions" it simply removes thech-hide
, even for this reason is displayed immediately. So, if you want something like this, press all of them and then hide X. When you click make the elements visible. The other way is to load by AJAX, that is, when clicking sends a request to the server (which responds) and then displays, identical system to paging.– Inkeliz
Yes that’s exactly what I want, load all and go showing little by little by clicking the button until the list is finished. I get lost in how I would create this array and I would limit forever to go showing from ten to ten... know any example? the above comment has already opened me quite the way of how to do, obg
– Alexandre Galvão Alves