if we put the code which aim to start the slider at the footer file ,then it shows the bug,,
so we put them in the header file