I'm trying to wrap each number in a span.
Here is where I'm at.
<div class="numbers">12345</div>
<div class="numbers">12345</div>
<div class="numbers">12345</div>
$('.numbers').each(function (index) {
var characters = $(this).text().split("");
$(this).empty();
$.each(characters, function (i, el) {
$(this).append("<span>" + el + "</span");
});
});
Where could I be going wrong with the syntax?