Abhilash J A

Abhilash J A

  • 530
  • 2.4k
  • 600.4k

How to show only 10 items using loop ?

Apr 12 2017 4:16 AM
Here I want show only 10 items. How can break if counter == 10 ?
  1. var counter = 1;  
  2.   
  3. $("#update").click(function() {  
  4. var btnView = '<div id="idImgView" class="browse btn btn-primary">View</div>';  
  5.   $('#clearbtn-' + (count - 1)).append(btnView);  
  6.    counter++;  
  7. }); 
 

Answers (4)