I tried alomost all elements but nothing changed after clicking icon chat windows appears in same place. So guys i want to move live chat window which comes after clicking the chat icon from one corner to another corner thats all. receives about 99 unique visitors per day, and it is ranked 7384564 in the world. i want to change this live window which comes on site after clicking the chat icon. on site there is live help chat button, one you click icon you must enter your details and than live agent will assist you. RemoveEventListener("DOMContentLoaded", initWhenReady) Ī(document.querySelectorAll(".So i have one issue. Stay available live in all most well-used messengers 24/7. Ĭonst wdg = document.createElement("div") iFrame Live Chat widget Having a faster and more individual connection, make more customers happy 1 / 6 Description Elfsight All-in-One Chat Box is one of the handiest ways for website visitors to contact you and get support from you. Note how data attributes can be used in DOM elements to store more data specific to your widget. It is often a good solution to use iframe when creating different applications that will be embedded on third-party websites. any element having a CSS Class of chat-box) and then initialize a widget inside of them (jQuery made this approach popular). You could add your "script" once and wait for the rest of the page to load, then search the document for a "known" set of elements (ex. the chat id), defining styles as well other possible improvements that would make the runtime more efficient. You would have to add more in order to support passing options to each widget (ex. This is just a sample approach of how it could be done. So you could use this in multiple places just by droping in this script tag in the desired locations: Here is a simple Javascript Widget factory - the create() returns an HTML element with your widget: const Widget = Object.create(` ĭocument.getElementById(id).appendChild(myWidgetInstance) Let me break it down this way: Widget Factory Also, since you are not using Web Components (and are looking for a pure javascript (no libs)), then you also have to initialize the widget "manually" and then insert it to the page at the desired location - as oposed to a declaritive approach where you have an assigned HTML tag name for your widget that you just add to the document and magic happens :) El elemento HTML
0 Comments
Leave a Reply. |