I have declared the same structure:
<div class="btn-group" data-toggle="buttons" style="margin-left:50px;">
<label class="btn btn-default">
<input id="past5m" type="radio"> 5m
</label>
<label class="btn btn-default">
<input id="past1h" type="radio"> 1h
</label>
</div>
which, according to this should enable me to attach an onclick
event by adding:
$(document).ready(function() {
$('#past5m').click(function() {
alert('hello');
});
});
JQuery is already included in the code.
However, when `#past5m' is pressed, nothing happens.
Can you please help me to spot the error?
Thanks.