I have a bar att the bottom of the page that when I scroll the page I want it to be as wide as the content needs it to be and fixed to the bottom.
Like this:
But when it hits the footer I want it to niecely slide out to cover the whole page-width. Like this:
I have solved everything except how to make it widen nicely. Now I have a js-event happening when the scroll reach the right position of the page for the widening. I then fire this:
$('#bar').css('width' : '100%');
As soon as I scroll up from it and want the bar to be small again I fire this:
$('#bar').css('width' : 'auto');
In my css i have this:
-webkit-transition: width 1s; /* Safari */
transition: width 1s;
Right now it all works EXCEPT the transition effect. The bar just blipps really quick to the other size. Why is the transition not working?
EDIT: Am using this to solve the footer bar stoping-issue: Stop fixed position at footer