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.
You’re returning a boolean value out of
hasWhiteSpace(), so you should skip the> 0in your conditional.