I’m currently using interface elements for jquery, a collection of rich interface components that utilize the lightweight JavaScript library jQuery, to add drag & drop functionality to a project at work.
One of the project constraints was that the “droppables” i.e. the target drop zones for draggable elements, had to be created with a fixed position (i.e. position:fixed).
This, unfortunately, isn’t (yet) supported by the interface library and so I had to add a bit of code to the iutil.js script which makes up part of the core “interface” library.
So, without much ado and for anyone else who may require the functionality, here’s the updated/hacked portion of code in question (delimited by START and END):
getPositionLite : function(el) {
var x = 0, y = 0;
while(el) {
// START
if(el.style.position == “fixed”) {
if (document.documentElement) {
y += document.documentElement.scrollTop;
x += document.documentElement.scrollLeft;
} else if (document.body) {
y += document.body.scrollTop;
x += document.body.scrollLeft;
};
x += parseInt(el.style.left, 10) || 0;
y += parseInt(el.style.top, 10) || 0;
break;
};
// END
x += el.offsetLeft || 0;
y += el.offsetTop || 0;
el = el.offsetParent;
};
return {x:x, y:y};
},
et voila… you are now free to position:fixed your droppable areas.
Just to be clear, the update/hack applies to version 1.2 of the interface library – I have no idea if this will work for other versions.

Previous Comments ~
Why use Interface Elements when you’ve got its successor jQuery UI" ? ;)
Nonetheless a nice fix :)
@ Bramus: Hi Bramus, long time no see/hear!
I’m actually using this version as I’d have to update the entire system should I upgrade to jQuery UI – which just isn’t feasible at the moment.
When the U.I release removes the “b” from the “1.5b”, I’ll have a solid business argument for setting aside time to complete the upgrade in full.
Woah man, you’ve went freelance – respect.
Regards,
Brian
Hi Brian,
indeed went freelance; Merely to handle the friend-requests (as in “My dad’s company needs a website’; ‘My friend from company Y heard you could fix his website”, etc.). Not even promoting myself and the projects just keep rolling in, thanks to word of mouth :)
Anywho, some exciting stuff got announced today over the jQuery Blog: March 14-15th will be the first Worldwide Sprint in order to prep jQuery UI for a 1.5 final :)
@ Bramus: Make sure you have the clients sign a rock-solid contract – seriously!
As for the jQuery sprint… it’s my birthday that weekend so I’ll be otherwise occupied! Good luck to the jQuery team though.