【问题标题】:WP Elementor Free: How do I get a button to execute a script?WP Elementor Free: How do I get a button to execute a script?
【发布时间】:2022-12-19 04:05:18
【问题描述】:

I have Zoho SalesIQ on my WordPress website designed with Elementor Free. It shows as a floating sticky widget and lets visitors chat with me. I want to insert a non-floating button on the page (in various spots) that lets visitors initiate a chat on click.

Zoho Support says this is possible, and provided the following instructions:

You need to create a custom button and then you have to invoke the API which is provided below in it.

Invoke the following code during the "on click" event/action of the custom button on your website

$zoho.salesiq.floatwindow.visible('show');

Sample: Live Chat

I inserted this code in an HTML widget in Elementor Free, but I cannot insert this code in a button widget.

How do I insert this code in an Elementor Free button widget to invoke the API and initiate a chat when the button is clicked?

Sorry if this is a basic question, I'm not a professional coder. I believe the code is JavaScript, but I'm not sure.

Thank you in advance.

【问题讨论】:

    标签: javascript wordpress onclick elementor buttonclick


    【解决方案1】:

    I've sort of solved this problem. I inserted a shortcode widget where the button needs to be, and the code in the widget as below:

    CHAT WITH US

    It works but it's a stopgap. The button itself will now have to be customised in html rather than CSS I think.

    【讨论】:

      猜你喜欢
      • 2022-11-20
      • 2022-12-02
      • 2022-11-20
      • 2022-12-01
      • 2023-01-06
      • 2022-01-04
      • 2022-12-02
      • 2022-12-01
      • 2022-12-02
      相关资源
      最近更新 更多