I am encountering a minor issue where I am attempting to incorporate a simple image that can be toggled on and off by clicking on it.
After coming across some bootstrap code online, I decided to test it in my project. Unfortunately, the code does not seem to function as expected when running it on my localhost.
Here is the HTML code:
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css">
<div class="container">
<h3>Bootstrap image checkbox(multiple)</h3>
<div class="col-xs-4 col-sm-3 col-md-2 nopad text-center">
<label class="image-checkbox">
<img class="img-responsive" src="https://dummyimage.com/600x400/000/fff" />
<input type="checkbox" name="image[]" value="" />
<i class="fa fa-check hidden"></i>
</label>
</div>
(more similar blocks of code follow...)
Below is the CSS code:
.nopad {
padding-left: 0 !important;
padding-right: 0 !important;
}
(image gallery styling also included...)
The JavaScript code snippet employed:
(JS functionality described with examples...)
Intended design appearance: codepen
Current outcome observed: results
The checkboxes are unresponsive and the positioning appears incorrect, as apparent from the results provided.
Facing obstacles as a beginner, I seek assistance in pinpointing the error on my end.
Your guidance and expertise will be immensely appreciated.