homepage redesign

This commit is contained in:
Lee Lawlor
2014-05-08 20:01:41 -04:00
parent e5570ec3af
commit ac83280b68
57 changed files with 569 additions and 328 deletions

View File

@ -0,0 +1,25 @@
// when the dom is ready
$(document).ready(function() {
// if the cheerlights row exists
if ($('#cheerlights_row').length > 0) {
// get the initial update
cheerlightsUpdate();
// check for new updates
setInterval('cheerlightsUpdate()', 15000);
}
});
// cheerlights update
function cheerlightsUpdate() {
// get the data with a webservice call
$.getJSON('https://api.thingspeak.com/channels/1417/feed/last.json', function(data) {
// if the field1 has data update the page
if (data.field1) {
if (data.field1 == "warmwhite") {data.field1 = "oldlace"}
$("#cheerlights_row").css("background-color", data.field1);
}
});
}

View File

@ -20,5 +20,10 @@ $(document).ready(function() {
$('#talkback_command_add_form').removeClass('hide');
});
// toggle contact form
$('#contact_link').click(function() {
$('#contact_form').toggle();
});
});