Read the statement by Michael Teeuw here.
Adding a jQuery Module
-
In addition to @strawberry-3.141 response. I wanted to chime in with option of running it locally on your dev machine and using
node serveronly
and pointing your browser athttp://localhost:8080
using familiar tools while developing. One of the catches is it will not work well if you are developing module that needs to interact with GPIO or other proprietary RasPi functionality.My personal workflow is roughly outlined here: https://forum.magicmirror.builders/post/13272
-
Thank you,
This is very helpful.
If I understand correctly, do I need to useDOM_OBJECTS_CREATED
like this ?notificationReceived: function(notification, payload, sender){ if (notification === 'DOM_OBJECTS_CREATED'){ $(document).ready()..... } },
Does that go into my plugin file ? (i.e not the node helper)
-
@NiviJah your Code example is correct, except that you don’t Need the ready function, at this Point the Dom is ready and you can do whatever You Wanted to without wrapping it into another event
-
jQuery didn’t want to play nice, i don’t know why, so I had to work with Vanilla JS.
here is the result
-
@NiviJah Did you get jQuery to run at all?