tvguide
Version:
Node module that auto-gets current (Dutch) tv show information
27 lines (23 loc) • 873 B
JavaScript
/* Settings object
*/
var settings = {
/* Global settings */
currentPage: 'now',
progressEnabled: true,
remote: 'LGRemote',
menuHandler: function (element) {
var activeId = '#' + $('.settingsMenuActive').attr('id');
var thisId = '#' + element.id;
var activePage = activeId.replace('Menu', '');
var thisPage = thisId.replace('Menu', '');
var thisWidth = $(element).width() + 40;
var thisX = $(element).position().left;
// Show requested page
$(activePage).addClass('hidden');
$(thisPage).removeClass('hidden');
// Animate active background
$('#settingsMenuBackground').animate({ 'left': thisX, 'width': thisWidth }, 200);
$(activeId).removeClass('settingsMenuActive');
$(thisId).addClass('settingsMenuActive');
},
}