There is some flickering when I use the show and hide functionality on my divs. I'm using the following code now:
当我在我的div上使用show和hide功能时会有一些闪烁。我现在使用以下代码:
$(document).ready(function(){
$("#tekstvanitem-1").hide();
$("#thumbnail-1").hover(function(){
$("#tekstvanitem-1").show();
},function(){
$("#tekstvanitem-1").hide();
});
});
The problem is when i rollover thumbnail-1 it show tekstvanitem-1. But because tekstvanitem-1 pops up over thumbnail-1 it then looks like its flickering because im not on thumbnail-1 anymore. So it's kind of a loop.
问题是当我翻转thumbnail-1时它显示tekstvanitem-1。但是因为tekstvanitem-1突然出现在thumbnail-1上,所以它看起来像闪烁,因为我不再在thumbnail-1上了。所以这是一个循环。
Is it possible to set the hover element when either my mouse is on thumbnail-1 or if my mouse is on tekstvanitem-1?
当鼠标位于thumbnail-1上或鼠标位于tekstvanitem-1上时,是否可以设置悬停元素?
thanks in advance!
提前致谢!
1 个解决方案
#1
5
Sure. Just put #tekstvanitem-1
in the selector...
当然。只需将#tekstvanitem-1放入选择器......
$(document).ready(function(){
$("#tekstvanitem-1").hide();
$("#thumbnail-1, #tekstvanitem-1").hover(function(){
$("#tekstvanitem-1").show();
},function(){
$("#tekstvanitem-1").hide();
});
});
#1
5
Sure. Just put #tekstvanitem-1
in the selector...
当然。只需将#tekstvanitem-1放入选择器......
$(document).ready(function(){
$("#tekstvanitem-1").hide();
$("#thumbnail-1, #tekstvanitem-1").hover(function(){
$("#tekstvanitem-1").show();
},function(){
$("#tekstvanitem-1").hide();
});
});