I am using bootstrap accordion-group as following :
<div class="accordion-group">
<div class="row-fluid">
<div class="span1">
<input type="checkbox" class="select-row"/>
</div>
<div class="span11"> ... </div>
</div>
</div>
there are so many rows of accordion group. Say i have selected any one. (Now the $(div.accordion-group) is added with "selected" class and input element get property of "checked")
Now i want when i select any other accordion-group element WITH SHIFT KEY PRESSED, then all the in-between accordion-group elements should also get selected automatically.
I am doing the following :
if (e && e.originalEvent.type === "click" && e.originalEvent.shiftKey === true) {
$(e.target).prevUntil(':checked', 'input[type="checkbox"].select-row').prop('checked', true);
$(e.target).prevUntil('.accordion-group.selected', 'input[type="checkbox"].select-row').addClass('selected');
}
I have also ensured that the code inside 'if' get executed by logging console. But code has no effect.
How do i achieve my goal?