Question

How do I show the Web Widget (Classic) on click?

Answer

You can use Web Widget (Classic) Javascript API for the Web Widget (Classic) to hide or show on click.

  1. Go to Admin Center, then navigate to the Web Widget page.
  2. Verify the widget is customized to show the desired Support features.
  3. Copy the widget code from the Setup tab.
  4. Navigate to the page where the widget should appear.
  5. Paste the widget code in the header or footer of the page.
  6. In JS section of page code, enter the zE.hide method after the $(document).ready(function
    $(document).ready(function() {

    <script> zE(function()
    {zE.hide();});
    </script>}
  1. Enter the zE.show method to have the widget show when the customer clicks the custom text or an image. 
    <a href="javascript:void(0);" id="showWidget" onclick="zE(function() {zE.show();});">Your text here</a>

Find more examples of how you can leverage these API methods in this article: Advanced customization of the Web Widget (Classic).

Disclaimer: This article is provided for instructional purposes only. Zendesk does not support or guarantee the code. Zendesk also can't provide support for third-party technologies such as JavaScript, jQuery, or CSS. Post any issues you have in the comments section or try searching for a solution online.
Powered by Zendesk