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();}); 

http://jsfiddle.net/eyasq/1/

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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -