i am checking certain condition in documnet.ready and && operator is not working code snippet lblvalue is empty.
$(function () {
var lblValue = $("#lblRadioText").text();
if (lblValue.length > 0 && hasWhiteSpace(lblValue) > 0) {
$("#rdExportLastTime").css('display', 'inline');
}
});
function hasWhiteSpace(text) {
return text.indexOf(' ') >= 0;
}
can you tell me what is wrong.
if ((lblValue.length > 0) && (hasWhiteSpace(lblValue) > 0)) {so that both statements are enclosed within their own parentheses.