I have a div with an ID that I want to toggle to show additional info when clicked. However, when I run JavaScript, the images go missing.
$('div').on('click', function() {
$(this).toggleClass('show-description');
});
.show-description p {
height: 150px;
}
.show-description small {
opacity: 1;
}
.first {
background-image: url("https://via.placeholder.com/1000");
}
.price {
float: right;
}
<div class="first">
<p>pumpkinnie
<small>awesome air fried pumpkin strips. </small></p>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>