1
I need only 5 items to be shown and in case the user wants to see more items he needs to click the button 'see more' and 5 more items will be displayed. Remembering q there is no limit amount of items.
<ul class="list">
<a href="loja1">
<li>
<img src="images/icon.jpg" title="" alt="" />
<section class="list-left">
<h5 class="title">Loja 1</h5>
</section>
<section class="list-left">
<span class="catpath1">Telefone :</span>
<span class="catpath">(99) 9999-9999</span>
</section>
<section class="list-left">
<span class="catpath1">Endereço :</span>
<span class="catpath">R blablabla, 222</span>
</section>
<section class="list-right">
<span class="cityname">Sao Paulo-SP</span>
</section>
<div class="clearfix"></div>
</li>
</a>
<a href="loja2">
<li>
<img src="images/icon.jpg" title="" alt="" />
<section class="list-left">
<h5 class="title">Loja 2</h5>
</section>
<section class="list-left">
<span class="catpath1">Telefone :</span>
<span class="catpath">(99) 9999-9999</span>
</section>
<section class="list-left">
<span class="catpath1">Endereço :</span>
<span class="catpath">R blablabla, 222</span>
</section>
<section class="list-right">
<span class="cityname">Sao Paulo-SP</span>
</section>
<div class="clearfix"></div>
</li>
</a>
<a href="loja3">
<li>
<img src="images/icon.jpg" title="" alt="" />
<section class="list-left">
<h5 class="title">Loja 3</h5>
</section>
<section class="list-left">
<span class="catpath1">Telefone :</span>
<span class="catpath">(99) 9999-9999</span>
</section>
<section class="list-left">
<span class="catpath1">Endereço :</span>
<span class="catpath">R blablabla, 222</span>
</section>
<section class="list-right">
<span class="cityname">Sao Paulo-SP</span>
</section>
<div class="clearfix"></div>
</li>
</a>
<a href="loja4">
<li>
<img src="images/icon.jpg" title="" alt="" />
<section class="list-left">
<h5 class="title">Loja 4</h5>
</section>
<section class="list-left">
<span class="catpath1">Telefone :</span>
<span class="catpath">(99) 9999-9999</span>
</section>
<section class="list-left">
<span class="catpath1">Endereço :</span>
<span class="catpath">R blablabla, 222</span>
</section>
<section class="list-right">
<span class="cityname">Sao Paulo-SP</span>
</section>
<div class="clearfix"></div>
</li>
</a>
<a href="loja5">
<li>
<img src="images/icon.jpg" title="" alt="" />
<section class="list-left">
<h5 class="title">Loja 5</h5>
</section>
<section class="list-left">
<span class="catpath1">Telefone :</span>
<span class="catpath">(99) 9999-9999</span>
</section>
<section class="list-left">
<span class="catpath1">Endereço :</span>
<span class="catpath">R blablabla, 222</span>
</section>
<section class="list-right">
<span class="cityname">Sao Paulo-SP</span>
</section>
<div class="clearfix"></div>
</li>
</a>
<a href="loja6">
<li>
<img src="images/icon.jpg" title="" alt="" />
<section class="list-left">
<h5 class="title">Loja 6</h5>
</section>
<section class="list-left">
<span class="catpath1">Telefone :</span>
<span class="catpath">(99) 9999-9999</span>
</section>
<section class="list-left">
<span class="catpath1">Endereço :</span>
<span class="catpath">R blablabla, 222</span>
</section>
<section class="list-right">
<span class="cityname">Sao Paulo-SP</span>
</section>
<div class="clearfix"></div>
</li>
</a>
<a href="loja7">
<li>
<img src="images/icon.jpg" title="" alt="" />
<section class="list-left">
<h5 class="title">Loja 7</h5>
</section>
<section class="list-left">
<span class="catpath1">Telefone :</span>
<span class="catpath">(99) 9999-9999</span>
</section>
<section class="list-left">
<span class="catpath1">Endereço :</span>
<span class="catpath">R blablabla, 222</span>
</section>
<section class="list-right">
<span class="cityname">Sao Paulo-SP</span>
</section>
<div class="clearfix"></div>
</li>
</a>
<a href="loja8">
<li>
<img src="images/icon.jpg" title="" alt="" />
<section class="list-left">
<h5 class="title">Loja 8</h5>
</section>
<section class="list-left">
<span class="catpath1">Telefone :</span>
<span class="catpath">(99) 9999-9999</span>
</section>
<section class="list-left">
<span class="catpath1">Endereço :</span>
<span class="catpath">R blablabla, 222</span>
</section>
<section class="list-right">
<span class="cityname">Sao Paulo-SP</span>
</section>
<div class="clearfix"></div>
</li>
</a>
<a href="loja9">
<li>
<img src="images/icon.jpg" title="" alt="" />
<section class="list-left">
<h5 class="title">Loja 9</h5>
</section>
<section class="list-left">
<span class="catpath1">Telefone :</span>
<span class="catpath">(99) 9999-9999</span>
</section>
<section class="list-left">
<span class="catpath1">Endereço :</span>
<span class="catpath">R blablabla, 222</span>
</section>
<section class="list-right">
<span class="cityname">Sao Paulo-SP</span>
</section>
<div class="clearfix"></div>
</li>
</a>
</ul>
Add the values in one
array
and then make afor
ofn
up to 4 and store the largest number in a global variable. You can initializen = 0
– Valdeir Psr
you can set an initial height for the list and hide the rest with Hidden overflow, and as the user clicks it increases the height
– fronthendy