Anyone know of a jQuery fisheye/dock navigation plugin that is able to have a fixed position?

最后都变了- 提交于 2019-12-04 09:51:23
Tin Nguyen
getPointer : function(event)
{
    var x = event.pageX || (event.clientX + (document.documentElement.scrollLeft
            || document.body.scrollLeft)) || 0;
    var y = event.pageY || (event.clientY + (document.documentElement.scrollTop
            || document.body.scrollTop)) || 0;
    //subtract, add scrollbar    
    y -= $(window).scrollTop();
    return {x:x, y:y};
},

Modify iutil.js of interface, you show subtract scrollTop

Fixed positioning can be done with CSS.

#main_menu {
  position: fixed;
  top:10px;
  left:10px;
}

I haven't used any of these fisheye javascript things, but I presume they'll work with fixed elements.

I suggest you try this one.

Why don´t you get your navigation bar in one div, and the content in another div, with overflow auto? Then the navibar is always on top.

Like here: http://www.pmob.co.uk/temp/fixed-header.htm

Some more solutions out-of-the-box to avoid re0inventing the wheel (of course, if license allows)

http://www.ndesign-studio.com/blog/mac/css-dock-menu

Loaden

You can patch the jQuery interfaces Fisheye with this patch. Then Fisheye works with position: fixed;

see: http://www.monkey-business.biz/181/jquery-interfaces-fisheye-position-fixed-patch/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!