Zend certified PHP/Magento developer

Magento2: Div is appearing like a flash

I am working on Magento2.2.4. I know this error occurred on the Magento website but it’s with a CSS and Js. So that I am posting here.

I have two divs on my static block one div is for right side sticky and the other is at right bottom.
When I click on the right side sticky image, the right bottom image should appear, then when clicking on right bottom image’s x bottom, the right side sticky should appear.

Right side sticky image is with the class .float-image-contact and right bottom div with class .float-image-footer.

So I made some script for the requirement.

But when I load the page, the right bottom div is appearing like a flash. It’s just coming like a blink. It will disappear within 0.5 seconds. And then the requirement is as usually working.

Why that flash is appearing?

My code is as follows:

Contact Image