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++;         }); 

demo


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -