|
|
Line 45: |
Line 45: |
| | | |
| | | |
- | <script type="text/javascript" src="http://users.skumleren.net/gumle/lightbox/js/prototype.js"></script>
| + | #scroller { |
- | <script type="text/javascript" src="http://users.skumleren.net/gumle/lightbox/js/scriptaculous.js?load=effects,builder"></script> | + | position: fixed; |
- | <script type="text/javascript" src="http://users.skumleren.net/gumle/lightbox/js/lightbox.js"></script> | + | right: 0; |
- | <link rel="stylesheet" href="http://users.skumleren.net/gumle/lightbox/css/lightbox.css" type="text/css" media="screen" />
| + | top: 50%; |
- | <script type="text/javascript" src="http://users.skumleren.net/gumle/lightbox/lightboxSEB.js"></script>
| + | width: 8em; |
- |
| + | margin-top: -2.5em; |
- | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" charset="utf-8"></script>
| + | } |
- | <script type="text/javascript" charset="utf-8">
| + | |
- | var $j = jQuery.noConflict();
| + | |
- | jQuery(document).ready(function(){
| + | |
- | var menu = $j('#menu') | + | |
- | var pos = menu.position().top;
| + | |
- | var offset = 20; | + | |
- | | + | |
- | $j(window).scroll(function(){ | + | |
- | $j('#test').text(menu.position().top);
| + | |
- | if(($j(this).scrollTop() + menu.height() + offset) > $j('#EndOfPage').position().top) {
| + | |
- | menu.css("position", "absolute");
| + | |
- | menu.css("top", ($j('#EndOfPage').position().top - menu.height()) + "px");
| + | |
- | }else{
| + | |
- | | + | |
- | if(($j(this).scrollTop() + offset) > pos) {
| + | |
- | menu.css("position", "fixed");
| + | |
- | menu.css("top", offset + "px");
| + | |
- | }else{
| + | |
- | menu.css("position", "relative");
| + | |
- | menu.css("top", "0px");
| + | |
- | }
| + | |
- | }
| + | |
- | | + | |
- | | + | |
- | });
| + | |
- | });
| + | |
- | </script>
| + | |
| | | |
| #design1{ | | #design1{ |