I'm unable to invoke the 'pause' function on the Bootstrap (3.0.2) carousel. I've tried every way I can think of to refer to the carousel instance, but - no errors, no pause.
<script>
var stepIndex = 3;
$('.carousel').carousel({
interval: 3000
});
$('#carousel-couples').on('slide.bs.carousel', function () {
stepIndex--
console.log("carousel stepping", stepIndex);
if (stepIndex == 0) {
console.log("supposedly pausing carousel");
$('.carousel').carousel('pause');
}
})
</script>
</body>
</html>