Click here to Skip to main content
15,895,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

CSS
$(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
Posted
Updated 18-Mar-13 21:28pm
v2
Comments
vinodkumarnie 1-Apr-13 7:09am    
Can you share your source code that you tried so far..?

CSS
.fadediv
    {
        filter:progid:dximagetransform.microsoft.alpha(opacity=70);
    }
 
Share this answer
 
Comments
shivani 2013 19-Mar-13 5:52am    
not working
Hi!!! professional
take a look of this link
http://forums.asp.net/t/1657072.aspx/1[^]
 
Share this answer
 
v2
Comments
shivani 2013 19-Mar-13 6:00am    
it is not fulfilling what i want.i want it in page load too
CSS part
CSS
div1{display : block}
div2{display: none}

or the vice versa. make display block of that div which you want to show on first time load of the page
JavaScript
<script type="text/javascript">

$(document).ready(function()
{
  $("GridView1").click(function()
    {
      $("#div1").animate({opacity: toggle}, 'slow');
      $("#div2").animate({opacity: toggle}, 'slow');
     });
  $("GridView2").click(function()
    {
      $("#div1").animate({opacity: toggle}, 'slow');
      $("#div2").animate({opacity: toggle}, 'slow');
     });
});
</script>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900