1
Right now, I have the code to follow: https://pastecode.xyz/view/3f023c9b
The following Javascript code is intended to make the buttons with the letters "Previous" and "Continue", respectively, return and advance a tab. But when you click, nothing happens.
<script type="text/javascript">
function prox(){
$('.nav-tabs').find('.active').next('li').find('a').trigger('click');
}
$('#btnA').click(function(){
$('.nav-tabs').find('.active').prev('li').find('a').trigger('click');
})
</script>
The buttons:
<div class="text-right">
<button type="submit" class="btn btn-primary" onclick="prox()">Salvar e Continuar</button>
<button type="button" class="btn btn-outline-secondary" id="btnA">Anterior</button>
</div>
There’s a mistake here:
<button type="submit" class="btn btn-primary onclick="prox()">
.... you put the onclick inside the class... would be:<button type="submit" class="btn btn-primary" onclick="prox()">
... or rather, did not close the class.– Sam
My error typing the example here. In the code is right.
– LUCAS DO HERVAL COSTA TELES DE
Okay! I’ll take a look.
– Sam