I have a 2-column layout with tabbed content on desktop. However, on mobile the second column displays below the first column. When clicking the tabs, you can't see the second column and therefore can't see what content is changing.
Is there a way using the following code I can get it to scroll down to the second column on clicking each tab?
HMTL:
<div class="video-carousel">
<div class="video-titles">
<div class="video-title">
<h4>Video Title 1</h4>
</div>
<div class="video-title">
<h4>Video Title 2</h4>
</div>
<div class="video-title">
<h4>Video Title 3</h4>
</div>
</div>
<div class="video-contents">
<div class="video-content">
FIRST VIDEO HERE
</div>
<div class="video-content">
SECOND VIDEO HERE
</div>
<div class="video-content">
THIRD VIDEO HERE
</div>
</div>
</div>
jQuery:
"use strict";
jQuery(document).ready(function($) {
$('.video-title').click(function() {
$('.video-title').removeClass('highlighted');
var index = $(this).addClass('highlighted').index();
$('.video-content').hide().eq(index).show();
});
});