Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // check if cookie panel is active and offset the live chat panel
- if ($('.cookieAcceptance').length) {
- // check cookie panel outer height
- var cookiePanelHeight = $('.cookieAcceptance').outerHeight(true);
- // offset Footer
- $footer.css('padding-bottom', cookiePanelHeight + 20 + 'px');
- var LC_API = LC_API || {};
- LC_API.on_after_load = function () {
- // Offset Live chat
- var $liveChatWrapper = $('#livechat-compact-container');
- var $liveChatFull = $('#livechat-full');
- $liveChatWrapper.addClass('live-chat cookie-visible');
- $liveChatFull.addClass('live-chat cookie-visible');
- $liveChatWrapper.css('bottom', cookiePanelHeight + 'px');
- $liveChatFull.css('bottom', cookiePanelHeight + 'px');
- if (LC_API.new_mobile_is_detected())
- {
- $liveChatWrapper.css('transform', 'translateY(-'+cookiePanelHeight+'px)');
- }
- }
- $(window).resize(function () {
- // check cookie panel outer height
- cookiePanelHeight = $('.cookieAcceptance').outerHeight(true);
- // offset Footer
- $footer.css('padding-bottom', cookiePanelHeight + 20 + 'px');
- // Offset Live chat
- var LC_API = LC_API || {};
- LC_API.on_after_load = function () {
- $liveChatWrapper.css('bottom', cookiePanelHeight + 'px');
- $liveChatFull.css('bottom', cookiePanelHeight + 'px');
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement