Change $label.html('<div class="text-label">' + textLabel + '</div>'); to $label.html('' + textLabel + '');