I'm trying to convert jQuery:
$li = $(this);
$li.prepend('<span class="icon-"></span>');
function to VanillaJS using createElement
.
li = document.createElement('span');
But still this statement does not do what prepend
function does. Can you please suggest any better solution.