Answer the question
In order to leave comments, you need to log in
How to show hidden elements using js in bootsrap 4?
<div class="container" id="some_block">
<div class="row">
<p> TEXT-SHOW </p>
</div>
<div class="row d-none">
<p> TEXT-HIDDEN</p>
</div>
</div>
<button id="show_more">Показать еще</button>
$("#show_more").on("click", function() {
$("#some_block").removeClass(".d-none");
});
Answer the question
In order to leave comments, you need to log in
Use the standard Collapse component , it is described in great detail on the official documentation page. Your problem is that you are reinventing the wheel when you have already invented the motorcycle, before I also did this very often, I do not advise.
$('#show_more').addEventListener('click', () => {
$('#some_block').removeClass('d-none')
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question