Im trying to fire a trigger on a radio button, but cant get it to work. It works fine if i use a checkbox instead, but i kinda need the radio button.
The radio button can be set by pressing it, or the Test div. If the radio button is changed it should fire the trigger.
<div class="testing">
<div class="test">Test</div>
<input type="radio">
</div>
$(".test").on("click", function() {
var radio = $(this).closest(".testing").find("input[type='radio']");
if (!radio.prop("checked")) {
radio.prop("checked", true);
} else {
radio.prop("checked", false);
}
})
$(".testing").on("change", function() {
$(".test").html("weee");
});