我想在鼠标悬停在datalist单元格项目时显示弹出窗口。但是,在页面加载时,所有弹出窗口一次出现,数据在单元格中不可见! ! [英] I want to show popup when a mouseover on datalist cell items. But, on pageload, all the popups coming at a time and data not visible in cells! !
问题描述
在页面上加载多个重复的弹出窗口!但是只有当我们将鼠标悬停在datalist中的单元格项目上时才需要弹出窗口。
我尝试过的方法:
// javascript //
< script type =text / javascript>
函数MouseOver(){
alert(Init);
$(#Tbl_Cont tr)。mouseenter(function(e){
$(document)。 ready(function(){
var moveLeft = 20;
var moveDown = 10;
// $(span #M_over)。hide();
$(span#M_over,this).show()
.css('top',e.pageY + moveDown)
.css('left',e.pageX + moveLeft);
alert(hi);
})。mouseleave(function(e){
// $(this)。 css(background-color,#CC CCCC);
$(span#M_over,这个).hide();
});
});
}
< / script>
///// css /////
table#Tbl_Cont
{
宽度:200px;
保证金:0自动;
text-align:justify;
游标:指针;
}
#M_over
{
宽度:250px;
身高:200px;
背景色:#7C8698;
位置:绝对;
左:400px;
填充:10px;
}
///// /我的代码隐藏代码////
str = str +
++ oItem [ID] + + oItem [Eve_Name] +:+ oItem [Description] ++ |
///////asp.net源代码会是这样的////
width =130pxcellpadding =0cellspacing =0>
8 on page load itself multiple and repeated popup windows coming!. But i want a popup only when we mouse over the cell items in datalist.
///////asp.net source code will be look like this//// width="130px" cellpadding="0" cellspacing="0">
推荐答案
(#Tbl_Cont tr) .mouseenter(function(e){ ("#Tbl_Cont tr").mouseenter(function (e) { (document).ready(function(){ (document).ready(function () { (span#M_over)。hide(); ("span#M_over").hide(); 这篇关于我想在鼠标悬停在datalist单元格项目时显示弹出窗口。但是,在页面加载时,所有弹出窗口一次出现,数据在单元格中不可见! !的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文
登录 关闭
扫码关注1秒登录
![]()
发送“验证码”获取
|
15天全站免登陆
|