How to check if certain row in textarea is empty with javascript?
<script type="text/javascript" src="../../../js/jquery-1.3.2.min.js"></script>
<script>
$(document).bind('keydown',function (e) {
if(e.which==13) {
function isRowEmpty( idOfTextArea , row ){
return $("#" + idOfTextArea )[0].value.split("\n")[row-1] == "";
}
alert(isRowEmpty("txtarr",3));
}
});
</script>
<textarea id="txtarr" rows="30" ></textarea>
But it returns always false