I am trying to move elements from the div with the class .pagebreakable
within #bodytextp4
to #bodytextp5
if they do not fit and place them on the next page. However, I am facing an issue where this code is not working as expected. Can someone help me figure out why?
$('#bodytextp5').prepend($('#bodytextp4 div').find(".pagebreakable").slice(-1));