Detect screen size and write media query
function for detect element scrolling has stopped by vanilla.js