javascript - Stick 20% image at the Top while scrolling -
i have bootstrap modal window, consisting of:
- an image , list down comments on image.(scrollable
overflow:auto
) - the modal window has add comment textarea @ bottom.
i want acheive following functionality: when comment section scrolled up, wanted stick bottom 20% of image on top , scroll comments below
please refer fiddle: http://jsfiddle.net/9u9mztqs/1/
images reference
so, created fiddle doing job, not beautiful yet...this job ;)
http://jsfiddle.net/9u9mztqs/2/
i hope solve problem.
if (windowpos == 0) { s.removeclass('stick_in'); s.addclass('stick_out');} }
the image resized scrolling top. of course can insert value want here.
Comments
Post a Comment