Hide div with jquery

No prob, you’re welcome! :-) You might hide the element from the start using a CSS class, like

.hidden {
  display: none;
}
<span class="badge badge-success hidden">
  <div id="datacount"></div>
</span>

jQuery’s .show() method will then override that CSS as soon as a non-zero response arrives.

1 Like