image for site

JavaScript to Hide Web Widget Initially

Use the zE.hide method to initially hide the Web Widget (Classic) on page load.

What is the JavaScript code to hide the Web Widget (Classic) initially?

To initially hide the Web Widget (Classic), you can use thezE.hidemethod in your JavaScript code.

After pasting the widget code into the header or footer of your page, add the following code snippet in the JavaScript section:

$(document).ready(function() { zE(function() {zE.hide();}); });

This code ensures that the widget is hidden when the page loads. You can then use thezE.showmethod to display the widget when needed.


More related questions

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

To show the Web Widget (Classic) on click, you can use the Web Widget (Classic) Javascript API. First, navigate to the Admin Center and go to the Web Widget page to ensure the widget is customized with the desired Support features. Copy the widget…

How do I make the Web Widget (Classic) appear when clicking a link?

To make the Web Widget (Classic) appear when clicking a link, use thezE.showmethod in your HTML code. First, ensure the widget is hidden initially using thezE.hidemethod. Then, add a clickable element, such as a link or button, with an…

Can I customize the Web Widget (Classic) to show specific features?

Yes, you can customize the Web Widget (Classic) to show specific Support features. In the Admin Center, navigate to the Web Widget page and verify that the widget is set up to display the desired features, such as the Contact form, Help Center, or…

What should I do if I need help with JavaScript for the Web Widget?

If you need help with JavaScript for the Web Widget, note that Zendesk does not support or guarantee the code. While the article provides instructional guidance, Zendesk cannot provide support for third-party technologies like JavaScript, jQuery,…

Interested indeflectingover 70% of your Zendesk support tickets?

Our AI customer support agent is here to help. Trained on all your help docs, installed directly into your Zendesk account, it can be used to automate customer replies for tickets or live chat. Learn more below.
Zendesk logo

Zendesk Support Tickets

Receive new tickets by email or a support form? This integration is for you.
My AskAI integrated within Zendesk to deflect support tickets
Learn about our Zendesk ticket integration
Zendesk logo

Zendesk Messaging (live chat)

Using Zendesk's Messaging widget on your site for live chat? This integration is for you.
My AskAI integrated within Zendesk to deflect customer support live chat conversations
Learn about our Zendesk Messaging integration

Join1,000+ companies reducing their support costs and freeing up support agents for more important work

Vestd company logo — Customer of My AskAI's AI customer support agents
Genesis company logo — Customer of My AskAI's AI customer support agents
Zinc company logo — Customer of My AskAI's AI customer support agents
Customer.io company logo — Customer of My AskAI's AI customer support agents
Zeffy company logo — Customer of My AskAI's AI customer support agents
NHS company logo — Customer of My AskAI's AI customer support agents
Kontakt.io company logo — Customer of My AskAI's AI customer support agents

Reduce support costs.Spend more time on customer success.

Our AI customer support agents are already used by 👇
Companies using AI assistants on their websites