Creating javascript for a scratch and reveal effect - works well in the design tool not rich text
I'm not sure what the issue is here? Are you trying to implement this code within a Rich Text module? Cause Rich Text isn't really built to use CSS and Javascript.
If you want a module for using this code it'd be better to create a custom module for it. You can do this in the Design Manager by clicking File > New File in the left sidebar and choosing Module from the options in the box that pop ups.
If this answer solved your question, please mark it as the solution.
Creating javascript for a scratch and reveal effect - works well in the design tool not rich text
Hello,
Yes i am trying to copy this ode onto the rich text modle on the landing page - as I want to design a landing page which has shamrocks on and can scratch this off to reveal a code underneth.
When i upload the code into the advantance settings on the landing page in the header then it works perfectly however i would like it on the module itself.
For some reason when i apply that module onto the landing page it makes the top image still go wonky - I am just wondering why is this?