imagecube js立方体旋转错误
我对 imagecube jquery 插件有一个小问题。 http://keith-wood.name/imageCube.html
我已经让它正常工作了主页上有三个未链接的图像。当我在它们周围放置链接时,向上旋转变得不稳定。有人有什么想法吗?提前致谢。链接如下:
I have small issue with the imagecube jquery plugin. http://keith-wood.name/imageCube.html
I've gotten it to work just fine on the homepage with three UNLINKED images. When I put links around them, the upward rotation goes wonky. Anyone have any thoughts? Thanks in advance. Link to follow:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将
onclick
属性与window.location.href=">insert url here<"
结合使用,为每个带有 csscursor:pointer;
的图像添加onclick
属性。 code> 而是包装 anker-tag:html:
css:
另请参阅此示例。
You could use the
onclick
attribute withwindow.location.href=">insert url here<"
for each image with a csscursor: pointer;
instead wrapping an anker-tag:html:
css:
Also see this example.
Scessor 的解决方案可能是可行的方法,但出于兴趣,您还可以在每次旋转时动态包装和展开
标记中的图像。 imageCube 的 beforeRotate 和 afterRotate 处理程序使这成为可能。
HTML:
javascript:
正如你所料,HTML 被简化了,但 js 更复杂了。
请注意,此解决方案采用自定义
属性,因此页面可能无法在大多数验证器中进行验证。
Scessor's solution is probably the way to go but out of interest, you could also dynamically wrap and unwrap the images in
<a>
tags at each rotation. imageCube's beforeRotate and afterRotate handlers make this possible.HTML:
javascript:
As you might expect, the HTML is simplified but the js is more complicated.
Please note that this solution employs custom
<img ... url="...">
attributes, so the page will probably fail to validate in most validators.