I’d like to learn how to use WiXCode to make small modifications to a Single Post page/ I want to disable a link on the page. I found how to see the source code. I found the data-hook for the element:
WixCode understands all of Javascript, except for anything that accesses the DOM. This keeps the user from inadvertently “breaking” something. I myself tried to hack things from the code, from an iFrame, and in my dreams, but WixCode wasn’t having any of it. Accessing document elements such as div, span, button, etc is off-limits. The way to access elements on the page is only through $w.
One small exception is the $w.HtmlComponent (which is based on an iFrame). This element was designed to contain vanilla HTML and it works just fine. You just can’t try to trick it by using parent, window, top, etc. Same goes with the Javascript evaluate() function. It is sandboxed and does not allow access to the DOM.
Thank you for replying. I am new to WixCode so still trying to understand basics. What cn I do with the “data’hook” element data-hook=“recent-posts-desktop__link”>See All? “See All” is what is rendered to the page. Can I change “See All” to blank using WixCode? If sowhat would be that code?
@mpls1942 Adding code to an HTML component is not a part of the Wix Code product (which is what this forum is about).
The basics of an HTML component is to put any HTML code in it. That code can be copied from Facebook, Google, or anywhere else, but you need to know the exact code to put there (which is not related to Wix Code)… We can’t really help with that.