I have bootstrap 4 each slide contains form part, and I have next button, what i I want is to not move to next slide unless variable is true (for form validation purposes ).
I tried to attach onclick
with preventDefault()
but it did not work, also tried:
$('#c').on('slide.bs.carousel', function () {
$('#c').carousel(0);
})
but did not work, how to achieve what I want?