Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hide collect.chat after submitted (requieres js-cookie)
$(function() {
var collect_chat_completed = Cookies.get('collect_chat_completed');
if (collect_chat_completed == "true" && !Cookies.get('collect_chat_timer')) {
Cookies.set('collect_chat_timer', 'true', { expires: 1 });
Cookies.set('collect_chat_completed', 'true', { expires: 1 });
Cookies.set('collect_chat_closed', 'true', { expires: 1 });
}
if (Cookies.get('collect_chat_completed') == "true") {
$('#collect-chat-launcher').hide();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment