I asked a friend to create a site. I used bootstrap 3 as the basis for the website and hit the stumbling block a bit.
My friend wanted to create a tab where the background image of the section changes depending on which tab is active. I was able to make it work only on the tab using css, but I need to be able to change the entire background of the section, not just the tab bar.
I think this will require some kind of JavaScript, but unfortunately my skills in this area are still too weak to know how to do this, and google was just as useful as a hole in my head.
below is the html section that I need for the background image to change with each tab
<section id="about" class="content-section text-center"> <div class="row"> <div class="tab-content vertical-center"> <div id="aboutus" class="tab-pane fade in active"> <h2>...</h2> <p>...</p> </div> <div id="history" class="tab-pane fade"> <h2>...</h2> <p>...</p> </div> <div id="chef" class="tab-pane fade"> <h2>...</h2> <p>...</p> </div> </div> </div> </section> <div class="row"> <div class="col-lg-12 nav-pills-bg"> <ul class="nav nav-pills nav-justified"> <li class="active"> <a data-toggle="pill" href="#aboutus">...</a> </li> <li> <a data-toggle="pill" href="#history">...</a> </li> <li> <a data-toggle="pill" href="#chef">...</a> </li> </ul> </div> </div>
Any help is appreciated
source share