Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP
Browse files

limit total number of itesm on the page

  • Loading branch information...
commit d1e4474e0824c9ac52501a5c5863384db69399fd 1 parent 67329e5
@ivarvong ivarvong authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 app.js
View
15 app.js
@@ -100,6 +100,21 @@
} else {
//console.log("unknown item type");
}
+
+ var twitter_len = $("#twitter-ul").children().length;
+ var instagram_len = $("#instagram").children().length;
+ var max_items = 150;
+ if (twitter_len > max_items) {
+ for(var i=max_items;i<twitter_len;i++) {
+ $( $("#twitter-ul").children()[i] ).remove();
+ }
+ }
+ if (instagram_len > max_items) {
+ for(var i=max_items;i<instagram_len;i++) {
+ $( $("#instagram").children()[i] ).remove();
+ }
+ }
+
}

0 comments on commit d1e4474

Please sign in to comment.
Something went wrong with that request. Please try again.