I am currently experimenting with the jQuery nuSelectable plugin in order to enable users to select multiple items simultaneously. Unfortunately, I am encountering difficulties in making the selection work as intended. You can find the plugin here.
After selecting items, they should change color, but nothing happens when I click on them. What could be causing this issue?
Here is the HTML code:
<div id="item-container" class="text-center">
<div class="row element-medium-top element-medium-bottom">
<div class="selectIconBox ">
<div class="item iconWrap">1</div>
</div>
<div class="selectIconBox ">
<div class="item iconWrap">2</div>
</div>
<div class="selectIconBox ">
<div class="item iconWrap">3</div>
</div>
<div class="selectIconBox ">
<div class="item iconWrap">4</div>
</div>
</div>
</div>
This is the CSS code:
.iconWrap-selected {
background-color:#6a989e;
}
.iconWrap {
border: 2px solid #101820;
border-radius: 50%;
width: 70px;
height: 70px;
padding: 17px;
margin-bottom:10px;
font-size: 1.25em;
color:#101820;
position:relative
}
#item-container .iconWrap {
cursor: pointer;
transition: all 0.3s ease-in-out 0s;
}
.selectIconBox {
display: inline-block;
margin: 40px 80px;
}
Lastly, here is the JS code:
<script src="../assets/js/jquery.nu-selectable.js"></script>
<script>
$('#item-container').nuSelectable({
items: '.item',
selectionClass: 'selectIconBox',
selectedClass: 'iconWrap-selected',
autoRefresh: true
});
</script>
Your assistance with this matter would be greatly appreciated.