Fixed Div using MooTools 1.2
Posted on: November 21st, 2009
Tags: addEvent, Element, pin, position fixed
Newer browsers (such as Firefox or Internet Explorer 7) support position:fixed CSS option to pin something to particular window place. However page layout will be ruined if it is not supported by the browser. To solve the issue you have to create a javascript that tries to use position:fixed and if fixed positioning isn’t available, moves the DIV with position:absolute. MooTools 1.2 provides a component to create fixed elements, which is called Element.pin located in the more section.
Here is the MooTools part:
$('fixed-menu').pin();
});
The fixed div menu
The position of the div has to be aboslute
position:absolute;
left:10px;
top:10px;
}
Posted in MooTools | Trackback Url








No Responses to “Fixed Div using MooTools 1.2”
Trackbacks/Pingbacks
Leave a reply