javascript - Stick 20% image at the Top while scrolling -


i have bootstrap modal window, consisting of:

  1. an image , list down comments on image.(scrollable overflow:auto)
  2. 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

image 1 reference

image 2 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

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -