mardi 29 septembre 2015

If/else if/else error - unexpected identifier

I'm trying to execute an if/elseif/else statement, but I am getting an unexpected identifier error on the second else if. The rest of the statement works fine. I'm very new to coding, so I apologize if this is a simple mistake.

if (jQuery("#question").val() === "" && (rowCount == 1)) {
    analysis_empty=1;
} else if (rowCount > 1) {
    jQuery('.analysis_empty_title').css({"line-height":"normal"});
    jQuery('.analysis_empty_title').text("Results Displayed by Date Groups");
    jQuery('#here').html(jQuery('#dategrouptable').clone().attr('id', 'tableb_copy'));
    jQuery('#tableb_copy').css({"font-style":"italic"});
    var ptr = jQuery("#tableb_copy").find("tr");    
    ptr.find("td:last").remove();
} else if ((rowCount > 1) and (jQuery("#question").val() != "" )){
    jQuery('#analquestion_empty').css({"display":"none"});//ERROR HERE
} else {
    analysis_empty=0;
    jQuery('#analquestion_empty').css({"display":"none"});
}

Any thoughts?

Aucun commentaire:

Enregistrer un commentaire