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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login