Skip to content

Instantly share code, notes, and snippets.

@JarrydLong
Created June 23, 2017 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JarrydLong/f26a3458f4b5ba07d71b4f9bef85365a to your computer and use it in GitHub Desktop.
Save JarrydLong/f26a3458f4b5ba07d71b4f9bef85365a to your computer and use it in GitHub Desktop.
Open the chat window without having the hovercard open first
/**
* Opens the chat window (both online/offline) instead of having to click on the hover card's 'Send Message' or 'Start Chat' button.
*/
jQuery(document).ready(function(){
jQuery("body").on("click", "#wp-live-chat-header", function(){
setTimeout(function(){
jQuery("#wplc_start_chat_btn").click();
jQuery("#speeching_button").click();
}, 300);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment