I have a div which has a dynamic value. When #div1
is empty, I would like to show a simple value "0"
.
This is what I have so far:
<script language="javascript">
if ($('#div1').is(':empty')){
//and here I don't know to return value 0 as text
}
</script>