I am trying to embed a calendar dynamically via a Wix Code Dynamic Page. I have added a Wix 'HTML Code' element to my page and set the 'Code' setting to the following:
<div id="calDiv" class="app-placeholder-calendar" data-id="proj_zIgBiRDoKpNuvJqmliIwS"></div>
1. I need to be able to change the 'data-id' attribute on the top div element within the $w.onReady() event. I cannot seem to figure this out.
2. Also, whenever I try to write the following line of code in this event:
i get the following error: "document is undefined"
are we not allowed or able to use the DOM in this traditional way?
3. if necessary, can I replace the entire code fragment for the 'HTML Code' element? I do not see a property for that in the code editor?
Thanks for all the help in advance!