问题描述
我有一个表格,其中我有2个div。在div1我有一个gridview1,一列作为链接,在div2我有gridview2和一个关闭按钮。我想完成,当我点击gridview1 div2应该过来div1和div1的内容应该被淡化。当我点击div2的关闭按钮时,div2应该不可见,div1应该褪色
代码
$(document).ready(function()
{
$(GridView1)。点击(function()
{
$(#div1)。 fadeOut();
});
});
$(document).ready(function()
{
$(button)。点击( function()
{
$(#div1)。 fadeIn
$(#div2)。 fadeOut
();
});
});
默认我希望div2应该是不可见的
但是我无法实现它。我得到的是:div2也显示在pageload中,当我点击div1 gridview div2时显示但是div1的内容也显示了
请告诉
问候
I have one form in which i have 2 divs.In div1 i have one gridview1 with one column as link and in div2 i have gridview2 and one close button.I want to accomplish that when i click on gridview1 div2 should come over the div1 and contents of div1 should be faded.and when i click on close button of div2,div2 should get invisible and div1 should faded in
Code
$(document).ready(function() { $("GridView1").click(function() { $("#div1").fadeOut(); }); }); $(document).ready(function() { $("button").click(function() { $("#div1").fadeIn $("#div2").fadeOut (); }); });
by default i want div2 should be invisible
but i am not able to achieve it.what i am getting is:div2 is also shown in pageload and when i click on div1 gridview div2 is shown but contents of div1 are also shown
pls tell
regards
这篇关于要更改另一个div上一个div的不透明度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!