How to make the spoiler closed by default?

How to make the spoiler visible by default closed?
$(document).ready(function(){
 $('.spoiler_title').on('click', function(){
 $('.spoiler_toggle').slideToggle(100, function() {
 var visible = $(this).is(':visible');
 $('.spoiler_indicator').html(visible ? '↑' : '↓');
});
$(this).toggleClass('active');
 return false;
});
});

<a href class="spoiler_title">....</a> 
 <div class="spoiler_toggle">
 <div class="spoiler_bg">...
 </div></div>
June 27th 19 at 15:12
1 answer
June 27th 19 at 15:14
Good night.
As an option
$('.spoiler_toggle').css('display', 'none')
Or in css file the same thing
.spoiler_toggle{
display:none;
}
And you good.
Tried. I have in the style display:block is. Without it does not work at all. - Gino_Lehn commented on June 27th 19 at 15:17
: What exactly is not working?
https://jsfiddle.net/6d6g7zmq/ - Dion77 commented on June 27th 19 at 15:20
everything worked https://jsfiddle.net/fbopdyLm/

Can hang a display: none on spoiler_bg? - Ansley_Bayer commented on June 27th 19 at 15:23

Find more questions by tags JavaScriptHTMLWeb DevelopmentCSSFrontend