I have this HTML markup
<div class="wizard-step">
<div class="wizard-step">
<div class="wizard-step">
<div class="wizard-step">
I must change html with jquery that after loop i get this markup
<div id="wizard-step-1" class="wizard-step tab-pane fade in active" data-step="1">
<div id="wizard-step-2" class="wizard-step tab-pane fade" data-step="2">
<div id="wizard-step-3" class="wizard-step tab-pane fade" data-step="3">
<div id="wizard-step-4" class="wizard-step tab-pane fade" data-step="4">
Working fiddle http://jsfiddle.net/brainbolt/52VtD/4/
Succinctly, with jQuery:
Fiddle