I have a static div’s and I want to create a pagination for this using PHP or JS. Let’s say I have 25 div’s and I want only to display 5 div’s per page. How to do this?
Here’s the format of the html div
<div class="newsbox">
<img src="#" class="news-img"/>
<div class="newsmargin">
<br />
<h3 class="news-h3">Title</h3>
<span style="color: gray; font-size: 14px;">28.9.2015</span>
<p class="newslineheight">Content</p>
<a class="buttonv1" href="#" target="_blank" style="padding: 10px 15px 10px 15px; line-height: 60px;">Read more</a></div>
</div>
<br />
<div class="newsbox">
<img src="#" class="news-img"/>
<div class="newsmargin">
<br />
<h3 class="news-h3">Title</h3>
<span style="color: gray; font-size: 14px;">28.9.2015</span>
<p class="newslineheight">Content</p>
<a class="buttonv1" href="#" target="_blank" style="padding: 10px 15px 10px 15px; line-height: 60px;">Read more</a></div>
</div>
Try with java script:
Demo :http://jsfiddle.net/fSmEL/167/