Click Event Not Firing When Radio Buttons Wrapped In A DIV Are Selected
I have a bunch of bootstrap panels on my web page and each panel contains three radio buttons. The panels which contains the radio buttons and the index, name, and value of the radio buttons are dynamically generated so I don't know ahead of time what the values of the mentioned attributes will be. Below is a sample of my radio button code after it is generated.
- <div class="panel panel-primary">
- <div class="form-group">
- <input type="radio" id="Xc2RT" name="Canine_1" value="Wolf"> Wolf
- </div>
- </div>
Below is the click function inside document ready targeting input elements but it is not working.
- $('input[type=radio]').click(function(){ alert('test')}