I am working on a project that involves a div element with the class "jumbotron" which currently has a background image applied to it.
Additionally, I have a menu consisting of 6 items that I would like to interact with.
My goal is to dynamically change the background image of the jumbotron based on which menu item is clicked. Each menu item corresponds to a unique image that should replace the current background of the .jumbotron element.
Here is the basic structure of my HTML:
<div class="jumbotron">
</div>
<ul class="nav nav-tabs">
<li><a href="#" data-toggle="tab">Item 1</a></li>
<li><a href="#" data-toggle="tab">Item 2</a></li>
<li><a href="#" data-toggle="tab">Item 3</a></li>
<li><a href="#" data-toggle="tab">Item 4</a></li>
<li><a href="#" data-toggle="tab">Item 5</a></li>
<li><a href="#" data-toggle="tab">Item 6</a></li>
</ul>
In the CSS file, you can find the styling for the .jumbotron class:
.jumbotron {
background-image: url(../images/item1.jpg);
}