`var setOpenModal = function () {
var theControl = $('.fOpenModal');
theControl.off().on('click', function () {`if (WorkStates == 'To be PO') {
$('#fPO').prop('checked', true);
$("#fVendorCB1").attr('style', 'display:none');
}else if(WorkStates == 'To be RFQ'){
$('#fRFQ').prop('checked', true);
$("#fVendorRad1").attr('style', 'display:none');
}
$.ajax({
url:blalala',
type: 'GET',
dataType: 'json',
cache: false,
data: {
blalala,
}
})
.done(function (json) {
$.each(json.rows, function (index, data) {
htmlPart += "<td>";
htmlPart += "<input type='radio' id='fVendorRad1' name='VendorRad' value=" + data.ID + " " + isPO + ">";
htmlPart += "<input type='checkbox' id='fVendorCB1' name='VendorCB' value=" + data.ID + " " + isRFQ + " >" + data.Name + "<span class='ref-num'>" + "(" + data.ID + ")" + "</span>";
htmlPart += "</td>";
}
};
I want to add attribute 'style = display:none' through JQuery to tag HTML '$("#fVendorRad1").attr('style', 'display:none');
' and $("#fVendorCB1").attr('style', 'display:none');
but it is not working.
The data html there are in the same object