Button not linking to javascript?


I wanted to link custom code to a webflow ui button. The button is not linking properly to the custom jquery. I tried this using a html button and it seems to work, so I don’t think the fault is with the jquery. It must be with linking the webflow ui.
If anyone can help me out, I’d really appreciate it. Thanks.

I’m really not sure what I’m doing wrong. I just want the button to change the text when you click the webflow ui button.

This is just a demo.
I’d appreciate it if anyone can help. Thanks.

<script data-info="hacks-body">
// jQuery
// on button click
  // paste your function - start
  document.querySelector('.hack12-text.hack-jquery').innerHTML = "This is me on Webflow.";
  // paste your function - end

Can you please share your project link so others can check on it, helpful to debug the issue.


Can I privately message it to you? It’s just that it’s a company website.

Ok no problem, dm me and I’ll look into it.

By the way, it is best to share the issue publicly because many experts can look into it as well. Sometimes there can be different solutions and it’s not always sure who can solve your issue.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.