I am trying to check the if the filename variable is empty. I use
$.each(rows, function(rowIndex, row){
var fileName = $.trim(fields[0]).toLowerCase();
//will output fileName
console.log(fileName );
//out -1,5,3,15,15,5,5,6,7,-1,3,5,5
console.log(fileName.indexOf('.html'));
if(fileName.indexOf('.html') < 0 || window.location.href.toLowerCase().indexOf(fileName) < 0) //invalid or different file, skip this row
{
//if the filename is empty skip this loop and check next loop filename variable
return true;
}
//the above script is to check to see if the filename is empty.
var $element = $('#' + fileName );
//doesn't show anything at all.
console.log(fileName );
})
everything before my 'if' statement will show but not after it.
Thanks for the helps.