jquery - qTip,可拖动

标签 jquery jquery-ui-draggable qtip

我试图在这里获取 qtip 示例:

http://craigsworks.com/projects/qtip/demos/position/fixed

这样当猫头鹰的图像移动时,qtip 也会随之移动(并保持在右上角)。

谢谢!

奖金问题..我还尝试在鼠标悬停时在猫头鹰周围出现悬停边框。

下面是实现这种 qtip 风格的代码:

<script type="text/javascript">
// Only create tooltips when document is ready
$(document).ready(function()
{
   // Use the each() method to gain access to each of the elements attributes
   $('#content img').each(function()
   {
      $(this).qtip(
      {
         content: '<a href="#">Edit</a> | <a href="#">Delete</a>', // Give it some content
         position: 'topRight', // Set its position
         hide: {
            fixed: true // Make it fixed so it can be hovered over
         },
         style: {
            padding: '5px 15px', // Give it some extra padding
            name: 'dark' // And style it with the preset dark theme
         }
      });
   });
});
</script>

我不知道为什么文档没有给我答案!

最佳答案

这是一个 qtip 弹出窗口可拖动的示例。

http://jsfiddle.net/cagura/VunSW/

关于jquery - qTip,可拖动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9559809/

相关文章:

dynamic - qTip 动态宽度

表中的 JQuery 行不会在回调函数中删除

javascript - 单击时按钮被禁用,然后单击按钮不会触发

Jquery + Css 拖放偏移问题

jquery - 使用qtip时如何避免页面滚动?

validation - jQuery验证UI插件不包括qTip资源

javascript - 循环后的 Jquery 在每个 div 中显示结果

如果 Bootstrap 选项卡未处于事件状态,jQuery 将删除一个 div

jquery - 可拖动 jquery get start Parent() 元素

javascript - 以编程方式移动可拖动位置