Content Dock Close Trigger

Hi there! I want to close Content Dock with button which was added with [button] shortcode. I want this button to close Content Dock like “X” close button. I want it to have same function. Probably i must give my button a same class like “X” close button have. And probably i need to add some JS trigger… Please help me, wise guys!

Link: https://модуль-демонтаж.рф

Hey Phillip.

Please try adding this code in the Global JS:

(function($){

    $(".tco-cookie-button").click(function(){
        $(".tco-close-content-dock").trigger("click");
    }); 


})(jQuery);

Kindly note that since this is a custom code that changes the default behavior/display of the theme, you will be responsible to maintain or update the code in case you require further changes or if the code stops working in future updates.

Hope this helps.

1 Like

:smile:Yep ) Dat works ) you know… HOW I LOVE YOU? :heart_eyes: Great Supporting! ) Love you guys )

1 Like

Glad we could always help, and you’re most welcome!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.