Toggle nav that switches a banner section I built this toggle nav that switches a banner section between the slider and a map. All works well but I would like to know how I could improve my JavaScript as I am quite new to it.

$(document).ready(function() {

// Banners Toggle
var bannerSlider = $('#banner_slider');
var bannerMap = $('#banner_map');

$('.thm-banner--toggles').find('a').on('click', function(e){
 e.preventDefault();

if ($(this).hasClass('toggle-map')) {
  bannerMap.css('z-index', '2');
  bannerSlider.css('z-index', '1');
}

if ($(this).hasClass('toggle-slider')) {
  bannerMap.css('z-index', '1');
  bannerSlider.css('z-index', '2');
}

});

});
The only thing I would change, without having anymore info about how the page is built, is from this

$('.thm-banner--toggles').find('a').on('click', function(e){


to

$('.thm-banner--toggles').on('click', 'a', function(e){


or this

$('.thm-banner--toggles a').on('click', function(e){