4
Answers

How to show only 10 items using loop ?

Mani Kandan

Mani Kandan

7y
280
1
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)