Use a Custom Trigger Button for Qiscus Multichannel Widget

  • Updated

Qiscus Widget already give you a trigger button like shown below:

trigger button

But if you ever have a case where you need to use your own button, you could do that by following this procedure:

  • We need to hide the original qiscus button
  • <style>
    .qcw-trigger-btn { display: none !important; }
    </style>
  • We need to have the replacement button trigger the click event for the original hidden button.
<script>
document.getElementById("qiscus-btn").addEventListener("click",function(){
document.querySelector(".qcw-trigger-btn").click();
});
</script>

You can refer to this codesandbox for a working example.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.