From 863ad41f7c5b1b0b58d484598fa6142d560e657f Mon Sep 17 00:00:00 2001 From: rembo10 Date: Thu, 27 Mar 2014 20:25:34 -0700 Subject: [PATCH] Limit concert display to next 5 only --- data/interfaces/default/artist.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/data/interfaces/default/artist.html b/data/interfaces/default/artist.html index be2bbb51..d57233d1 100644 --- a/data/interfaces/default/artist.html +++ b/data/interfaces/default/artist.html @@ -194,6 +194,19 @@ }); calendarDomNode.append('
  • '); + + $(function() { + $("#artistCalendar").each(function() { + $("li:gt(4)", this).hide(); /* :gt() is zero-indexed */ + $("li:nth-child(5)", this).after("
  • More...
  • "); /* :nth-child() is one-indexed */ + }); + $("li.more a").live("click", function() { + var li = $(this).parents("li:first"); + li.parent().children().show(); + li.remove(); + return false; + }); + }); } // data is JSON response object