jquery - Change radio button status when i click on any place of div -
eventprices += "<div class='after-price' id=divprice>"; if (localstorage.getitem('selectedrolename') != null) { if (localstorage.getitem('selectedrolename').tostring().trim() == "admin") { eventprices += "<span class='price'><input type='radio' value='" + item.priceid + "' id='chkeventprices' class='fa fa-check' name='chkeventprices' title='" + item.price + "' onclick='calculatetotal();'><label> $" + item.price + " </label> </span> "; } else { eventprices += "<span class='price'><input type='radio' value='" + item.priceid + "' id='chkeventprices' disabled= 'disabled' class='fa fa-check' name='chkeventprices' title='" + item.price + "' onclick='calculatetotal();'><label> $" + item.price + " </label> </span> "; } } else { eventprices += "<span class='price'><input type='radio' value='" + item.priceid + "' id='chkeventprices' disabled= 'disabled' class='fa fa-check' name='chkeventprices' title='" + item.price + "' onclick='calculatetotal();'><label> $" + item.price + " </label> </span> "; } eventprices += "<span class='date'>after " + moment(item.earlybirddate).format("mmm dd, yyyy") + " </span>"; eventprices += "</div></div>"; eventprices += "<div><span id='spneventpriceliteraldetails_" + + "'>" + eventpriceliteraldetals + "</span></div>"; } eventprices += "</div><br/>"; i++; });
this code.now if click on particular radio button taking..i want if click on box radio button select.
as per q
guessing function working on click on radio button.
so let's take radio
button class .radio
, 'div' class .test
in case if want can go `.trigger' of jquery. eg:
$('body).on('click',`.test`,function(){ $('.radio').trigger('click'); });
this work per me.ty
Comments
Post a Comment