From fb7fd6c29d25c6259334b08479f4ff2db89f0526 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Wed, 28 May 2014 16:05:00 +0300 Subject: Show one channel each time --- templates/home.html | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'templates') diff --git a/templates/home.html b/templates/home.html index b6e76bf..505acda 100644 --- a/templates/home.html +++ b/templates/home.html @@ -33,6 +33,13 @@ _.each(_.range(CHANNELS), function(i) { var row = $(_.template($('#light-row-template').text(), {i: i, subchannels: SUB_CHANNELS, cells: LOOP_LENGTH})); $('#light-container').append(row); + $('#channel-btns').append($('')); + }); + + $('.channel-btn').click(function() { + var chan = $(this).attr('data-channel'); + $('.light-channel').hide(); + $('.light-channel[data-light-channel=' + chan +']').show(); }); }); @@ -40,8 +47,11 @@

Light Loop Pi

+
+
+