javascript - Is it possible to fix lower right corner of div to screen w.r.t scroll up/down -
i want make div vertically expand when scroll down , vertically contract when scroll such lower right corner approximately maintain same position on browser screen.
#resizable { position:relative; float:left; width: 300px; height: 200px; padding: 0.7em; top:8px; left:2px; word-wrap: break-word;}
div need relative , adjustable align outer text wrap around it.
$(function() { $( "#resizable" ).resizable();});
i able without fixed positioning using bit of javascript: http://jsfiddle.net/eyasq/5/
$(document).scroll(function() { var top = $(document).scrolltop(); $("#resizable").css("margintop", top); });
the scroll
event listener update top margin of #resizable
div whenever page scrolled. div appear stay in place text reflow around it. effect little unusual, seems match requirements.
Comments
Post a Comment