I’m trying to take one string and split it into different chunks, and place it inside divs. Here’s my code:
var simple = '<?php echo $hallo; ?>';
var $div = $('#mybook');
if ($div.text().length > 50) {
var limit = simple.lenght = 10;
$(simple.split(limit)).each(function() {
$('#mybook').append('<div>'+this+'</div>')
});
}
Thank you, any help is appreciated.
Something like this should do the work: