Fixed bug with dynamic width

In my ongoing project I have the sticky block with the width specified in percents so whenever we do "stick" we need to fixate it in "px". I see you implemented this case but with a couple of bugs.

When we "stick" our block we need to fixate it with the current width in "px" (not the initial width), in my case the width of the block can be different everytime.
And when we "unstick" it we need return everything how it was before.

Also you forgot to specify units of the sticky block on the resize event.