Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/439.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript帮助禁用列链接和工具提示_Javascript_Jquery_Html - Fatal编程技术网

Javascript帮助禁用列链接和工具提示

Javascript帮助禁用列链接和工具提示,javascript,jquery,html,Javascript,Jquery,Html,如何禁用javascript单击和工具提示 你可以看到这里的问题 评级列不应显示工具提示或链接 它附着在我的选项卡行上: <tr class="thumbnail-item" onclick="window.open('<%= vind.tracking %>')" onmouseout="this.style.background='white';" onmouseover="this.style.background='#99ff33';this.style.cursor=

如何禁用javascript单击和工具提示

你可以看到这里的问题

评级列不应显示工具提示或链接

它附着在我的选项卡行上:

<tr class="thumbnail-item" onclick="window.open('<%= vind.tracking %>')" onmouseout="this.style.background='white';" onmouseover="this.style.background='#99ff33';this.style.cursor='pointer'">

我的工具提示脚本:

  <script type="text/javascript">


  $(document).ready(function () {

 $('.thumbnail-item').mouseenter(function(e) {

  x = e.pageX;
  y = e.pageY;

  $(this).css('z-index','15')
  $(this).css('cursor', 'default')
  $(this).find(".tiptip").css({'top': y,'left': x,'display':'block'});


 }).mousemove(function(e) {

  x = e.pageX;
  y = e.pageY;

  $(this).find(".tiptip").css({'top': y,'left': x});

 }).mouseleave(function() {

  $(this).css('z-index','1')
  $(this).css('background', 'none')
  $(this).css('color', '#000000')
  $(this).find(".tiptip").animate({"opacity": "hide"},100);
 });

});
  </script>

$(文档).ready(函数(){
$('.缩略图项').mouseenter(函数(e){
x=e.pageX;
y=e.pageY;
$(this.css('z-index','15'))
$(this.css('cursor','default'))
$(this.find(“.tiptip”).css({'top':y,'left':x,'display':'block');
}).mousemove(函数(e){
x=e.pageX;
y=e.pageY;
$(this.find(“.tiptip”).css({'top':y,'left':x});
}).mouseleave(函数(){
$(this.css('z-index','1'))
$(this.css('background','none'))
$(this.css('color','#000000'))
$(this.find(“.tiptip”).animate({“不透明”:“隐藏”},100);
});
});

其实很简单。为什么不直接处理
标记中的onmouseover/out事件,并将其保留在评级列中

TR背景着色可以通过将伪类附加到TR标记或.thumbnail项类来实现

tr:hover 
{
    background-color: #99FF33;
}

您应该禁用mouseover事件以弹出气泡

我已经使用firebug运行了下面的脚本来实现这个结果

$("#tabel1 tr td:nth-child(2):gt(0)")
.mouseover(
              function(event)
              {
                event.preventDefault();
                return false;
              });
编辑 由于您的鼠标位于工具提示上方,因此效果不佳。将光标稍微移离工具提示

这是你计算鼠标点的地方

x = e.pageX; 
y = e.pageY;
你应该这样做

x = e.pageX+3; 
y = e.pageY+3;

在mousemove和mouseover两种功能中,首先告诉我们如何附加这些事件。顺便说一句:那个评级插件在IE9中不起作用,我不得不在FF中打开它,看看你在说什么列。我已经更新了我的问题,它附在我的行上。谢谢你让我知道评级插件在IEF中不起作用,因为它会非常混乱。单凭这一点是不够的,因为他正在给鼠标上方整行的背景上色。您将只为一个单元格着色。然后处理行中的行着色,并在应处理的单元格中处理鼠标悬停/输出链接/工具提示。如果它变得“混乱”,为什么不定义一个javascript函数,这样你只需要调用它。如果行得通,没人会看密码?此外,行着色可以通过CSS伪类处理。当我将courser从右侧移动到评级列上方时,它不是防弹的,它将成为一个链接,并显示悬停图像。我正在使用Jquery,我已经用脚本更新了我的问题。我不知道你将工具提示从鼠标上移开是什么意思。在.mousemove和.mouseleave中?我仍然可以看到悬停时的工具提示如何禁用它?是的,我已经添加了它。该链接已禁用,但悬停时将显示工具提示