clone element and fix onscroll function