checkbox handler not working
I have a very simple setup but for some reason, the event handler for a checkbox is not firing.
first my php outputs a bunch of check box options based on admin input in the back-end. The result outputs checkboxes like so:
- <div class="span2">
- <input type="checkbox" name="Veg" value="BLACK OLIVES">BLACK OLIVE
- </div>
My javascript file is also super simple and I can see it in the inspector being loaded.
- $(":checkbox").change(function () {
- alert( "Handler for .change() called." );
- });
Not exactly sure why this would not work. I've tried, input:checkbox, form.on("change", ':checkbox", function(){... }); all kinds of things and I'm at a bit off a loss.
This is using JQuery 1.10.2 testing on Chrome
Version 34.0.1847.137 m