javascript - How to implement show more button on my page using js/jquery show/hide -
i have page contains 40 items. don't want 40 stories displayed on 1 page @ time. don't have ajax knowledge. without using ajax how can implement show more functionality on page show 10 items @ time on page using pure jquery/js hide()
or show()
, not ajax?
try:
html:
<div id="text1">text</div> <div id="text2">text</div> <div id="text3">text</div> <div id="text4">text</div> <br><br> <div id="button">show more</div>
jquery:
var count=2; $( "#button" ).click(function() { $( "#text"+count ).show(); count++; });
Comments
Post a Comment