LearnFast.Ninja

jQuery is div empty

Check if the div empty. This will return true or false. You can place this in if statement.

Check if the div empty. This will return true or false. You can place this in if statement.
$("#MyDiv").html() != ""

Example:

var isItemSelected = $("#ItemsArea").html() != "";

if (isItemSelected == true) {

    $("#ItemButton").hide();

}


Tags

jquery

html is-empty