0

I'm trying to use an example.

It is all well and nice, but I need to make those steps on top clickable. I tried:

var clickedIndex;
$('#progressbar').click(function(){
    clickedIndex = $(this).attr(id);
});
current_fs=index(clickedIndex);

and updated some other related places, but it didn't get me anywhere enough.

Here is a working example.

Wang Liang
  • 4,244
  • 6
  • 22
  • 45

1 Answers1

0
$('#progressbar li').on('click', function(){
  var step = $(this).index() - 1;
  $('fieldset').eq(step).find('.next').trigger('click');
});

It triggers a click on the next button of the step that was clicked

Sam Battat
  • 5,725
  • 1
  • 20
  • 29