make scroll calc in page load
create directive from javascript code for fixed bar