I'm using a draggable effect on a css div for a shopping cart (prototype+script.aculo.us). I want to insert a link into this div which allows the users to toggle between fixed and absolute positioning. Does script.aculo.us has any simple way of doing it? (So far i found nothing)
A:
What you're looking for is not actually part of scriptaculous but is part of prototype. The code you're looking for is going to be one of these:
$('element').relativize(); // to make the element relatively positioned
$('element').absolutize(); // to make the element absolutely positioned
$('element').setStyle({position:'fixed'}); // to make the element fixed
seengee
2009-09-05 18:36:06