When the document loads I am trying to css hide a check box only if a textbox has text. Instead all the check boxes are being hidden, even if the text boxes are empty. Any help please
$(document).ready(function () {
//if statements to disable the fill checkboxes if there are dates already filled
if ($("#<%=FinishDateSrvcTXT.ClientID%>").text != "") {
$("#<%=FinishFillCHK.ClientID%>").css('display', 'none');
}
if ($("#<%=startdateSrvcTXT.ClientID%>").text != "") {
$("#<%=StartFillCHK.ClientID%>").css('display', 'none');
}
if ($("#<%=FinishDateBodyShopTXT.ClientID%>").text != "") {
$("#<%=FillFinishBodyShopCHK.ClientID%>").css('display', 'none');
}
if ($("#<%=StartDateBodyShopTXT.ClientID%>").text != "") {
$("#<%=FillStartBodyCHK.ClientID%>").css('display', 'none');
}
if ($("#<%=CompleteDatedetailTXT.ClientID%>").text != "") {
$("#<%=CompleteFilldetailCHK.ClientID%>").css('display', 'none');
}
if ($("#<%=startdatedetailtxt.ClientID%>").text != "") {
$("#<%=startdatedetailCHK.ClientID%>").css('display', 'none');
});
.val()insead of.text