A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
Calling a general function
-
Hi guys, this is my first project using MM and I am having an issue to call a simple function.
I need only modify the variable using a function and it is not working. Maybe because I put the function in the wrong place. Please, help me:/* global Log, Module, moment */ /* Magic Mirror * Module: Compliments * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. */ var full_text = "Have a good stay"; function LoadData() { full_text = "Welcome " + "Renato" + ". Have a great stay !"; } $( document ).ready(function() { LoadData(); }); Module.register("compliments", { // Module config defaults. defaults: { compliments: { anytime:[ full_text, ], }, updateInterval: 72000000, remoteFile: null, fadeSpeed: 4000, morningStartTime: 3, morningEndTime: 12, afternoonStartTime: 12, afternoonEndTime: 17, },
-
@rsellmer said in Calling a general function:
afternoonEndTime: 17,
try removing the comma at the end of this line.
-
@rsellmer I’m not sure, but you seem to use jQuery. but jQuery is not included by default. You should include jQuery into your module.