THIS IS WHAT I AM TRYING TO MAKE IN THE FIDDLE BELOW
Edit: I managed to hide it properly by click. But it hides instantly. Is there an option to make it slide from the bottom of the screen?
THIS IS THE almost good FIDDLE
The old question below:
I am trying to hide an element when clicking on another element with the slidedown effect, but I have issues with it. As you can see on the fiddle, it almost works, but there is a leftover background, and the grey X toggle button is smaller when the info slides down. How can I fix it?
Here is the fiddle (Click the grey field with "X" on it)
<div id="full-width-slider" class="royalSlider heroSlider rsMinW rsDefault">
<div class="rsContent">
<img class="rsImg" src="https://www.w3schools.com/w3images/fjords.jpg" alt="">
<div class="infoBlock infoBlockLeftBlack rsABlock" data-fade-effect="" data-move-offset="100" data-move-effect="top" data-speed="200">
<a href="#" class="infox">X</a>
<div class="minus7">
<h4>Nice picture</h4>
<p>This is the info about it. It´s nice, short and easy to read.</p>
</div>
</div>
</div>
$(document).on("click", ".infox", function() {
$(".minus7").slideToggle();
});