i'm creating a work section and in that section i've created a navigation with some image containers
now when the user click on one of the navigation link . it would show the relative image container linked to that navigation link . for example if i clicks on the branding link it will show me the image container with the class branding. it's just like mix it up plugin but i'm not allowed to use mixitup.
i was trying this : https://jsfiddle.net/to1uuvnb/19/
but it didn't helped
<ul class="nav nav-pills nav-justified nav-tabss">
<li class="active">
<a href="#">All</a>
</li>
<li>
<a href="#">Branding</a>
</li>
<li>
<a href="#">Advertise</a>
</li>
<li>
<a href="#">Print</a>
</li>
</ul>
<div class="branding">
branding
</div>
<div class="advertise">
advertise
</div>
<div class="print">
print
</div>
my js
$('.nav-tabss').children('li').click(function(){
var branding = $(this).text();
if ( branding === "branding" )
{
$('.branding').show();
$('.adverise').hide();
$('.print').hide()
}
});
i know my js code is not efficient . if you guys can update the code that would be better and helpful thanks