So I'm trying to get the event click on radio buttons (meteor).
I'm doing in the template events (client js file):
Template.Questions.events({
'click #public_btn' : function (){
console.log('1');
// something
},
'click #private_btn' : function (){
console.log('2');
// something
}
and in the html client file I have the radio buttons:
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="privacy_options" value="public" id="public_btn"> Public
</label>
<label class="btn btn-primary">
<input type="radio" name="privacy_options" value="private" id="private_btn"> Private
</label>
</div>
The thing is the click
event does not fire as long ad the div
got the data-toggle="buttons"
Is there a way to fox this ?
$('#public_btn').click(function (){});
– Foch