Chatway Chatway
  • Home
  • Product
  • Pricing
  • Resources
    • Help Center
    • Blog
    • Integrations
    • Social Media Buttons
  • What’s New
  • Sign In →
Sign In Sign Up for Free Free Sign Up

How to show or hide the Chatway icon using Javascript

  • Help Center >
  • For developers >
  • How to show or hide the Chatway icon using Javascript

In this guide, we will show you the simple and easy-to-follow steps on how you can show or hide the Chatway icon using Javascript.

This feature is very helpful so you can give the option to your site visitors to chat with you anywhere on your website and hide the icon at any time. You can apply the Javascript function on a button or an image for easy access.

How to show the Chatway icon

To open the Chatway icon using a button click, start by adding a button then add the code below as the link:

javascript:$chatway.showChatwayIcon();

Click below to see how it works:

(if the Chatway icon is currently open, please hide it first by clicking here)

Show Chatway icon

You can also just add the code directly as a link:

Show Chatway icon

How to hide the Chatway icon

To hide the Chatway icon, just follow the same steps above but use the Javascript function below.

javascript:$chatway.hideChatwayIcon();

Click below to see how it works:

Hide the Chatway icon

Hide Chatway icon

If you want to hide the Chatway icon in order to launch the widget through your custom button, you can also use the custom CSS code below:

.chatway--container .chatway--trigger-container {
  display: none
}

How to hide the Chatway icon by default

If you want to hide the Chatway icon by default, you can add the script below to your site header.

<script>
  window.$chatwayOnLoad = function() {
    if (window.$chatway && typeof window.$chatway.hideChatwayIcon === 'function') {
      window.$chatway.hideChatwayIcon();
    }
  };
</script>

That’s it! Easy as 1,2,3 ☺️

You can also check this guide on how to open or close the Chatway widget using Javascript here.

chatway footer logo

Improve live chat communication and unlock customer satisfaction with Chatway

app store logo play store logo

Company

  • About Us
  • Privacy Policy
  • GDPR
  • Terms of Service

Resources

  • Contact us
  • Integrations
  • Help Center
  • Comparison Page

© 2025 Chatway. All rights reserved.