任何人知道一个jQuery fisheye / dock导航插件,能够有一个固定的位置? [英] Anyone know of a jQuery fisheye/dock navigation plugin that is able to have a fixed position?

查看:271
本文介绍了任何人知道一个jQuery fisheye / dock导航插件,能够有一个固定的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的网站上放置一个水平的鱼眼/船坞导航,但我需要它是固定的位置...所有我发现不支持固定位置。



这里是我发现的一些链接:




  • jQuery OS X Dock#1 - Doesn不支持固定位置

  • CSS Dock菜单 - 这与上面的非常相似...

  • euDock 2.0 - 支持类似于固定位置(位置:绝对与javascript,以确保它保持在同一个地方),但这不工作,因为它的方式太跳跃



您可以通过滚动鼠标, p>我还没有看到一个水平的,没有破裂,有一个垂直的工作与上面的第一个链接在同一页上。



任何人

修改:将定位更改为固定将会破坏这些菜单的功能特别的(他们甚至在上面的第一个链接的文章中说它)。

解决方案

  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};
},

修改iutil.js界面,显示减去scrollTop


I'm looking to put a horizontal fisheye/dock nav on my site, but I need it to be fixed positioning... all the ones I've found do not support fixed positioning.

Here are links to some of the ones I've found:

  • jQuery OS X Dock #1 - Doesn't support fixed positioning
  • CSS Dock Menu - This is very similar to the one above...
  • euDock 2.0 - Supports similar to fixed positioning (position:absolute with javascript to make sure it stays in the same place) but this doesn't work because it's way too jumpy when you scroll down (See what I mean by going to that link and scrolling)... real fixed position is usually perfectly smooth with scrolling.

I've yet to see a horizontal one that doesn't break, there is a vertical one that works on the same page as the first link above.

Anyone know any fisheye/dock menu that will work with fixed positioning?

Edit: Changing the positioning to fixed will break the functionality of these menus in particular (they even say it in the article in the first link above). I'm looking for one that won't break if I change the positioning to fixed.

解决方案

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

这篇关于任何人知道一个jQuery fisheye / dock导航插件,能够有一个固定的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆