Conversation
supportHi, We are using this plugin on a site where we also want to trigger it with some other buttons when a user clicks on it. I can’t really find how to do this? Hope you guys can help me out. Thanks!
Fixed this myself, for those who interested, this worked: jQuery(document).on('click', '.trigger-start-chat', function (e) { e.preventDefault(); if (jQuery('iframe#LeadboosterContainer').length) { jQuery('iframe#LeadboosterContainer').contents().find("button").trigger('click'); } else { alert('LeadboosterContainer not found'); } });
Fixed this myself, for those who interested, this worked: jQuery(document).on('click', '.trigger-start-chat', function (e) { e.preventDefault(); if (jQuery('iframe#LeadboosterContainer').length) { jQuery('iframe#LeadboosterContainer').contents().find("button").trigger('click'); } else { alert('LeadboosterContainer not found'); } });