I have 10 with the same class. I want only 2 divs displayed when the page loads and after clicking on the button load the next div more. Thus, after clicking on each button with additional load, the next single div should be displayed.
I tried with the code below but could not succeed.
<script type="text/javascript">
$( "#loadmore" ).click(function() {
$(".design-derection").one( "div" ).show();
});
</script>
HTML structure
<div class='content-block'>
<div class='design-derection'></div>
<div class='design-derection'></div>
<div class='design-derection'></div>
<div class='design-derection'></div>
<div class='design-derection'></div>
<div class='design-derection'></div>
<div class='design-derection'></div>
<div class='design-derection'></div>
<div class="view-more" id="loadmore">
<a href="javascript:void(0);">View More Ranges</a>
</div>
</div>
source
share