aspx Tutorial

.NET Articles,jQuery demo, asp.net with jQuery, online tutorial,Jquery, SilverLight, Javascript, asp.net,JSON, MVC,.NET Articles,demo, Web Services, .NET articles, Sharepoint 2010, visual studio 2010,Aamir Hasan,IT
Advertise Here

Advertize

wwwSW
Posted by Aamir Hasan   on Friday, November 12, 2010 Total Views:  

In this example, we will see that how to display/hide div element with fading effect using jQuery 1.4.4, fadeToggle() Method is added in  jQuery 1.4.4. This is the combination of fadeIn() and fadeOut().

Here's is the solution

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
   <title>Display/hide div element with fading effect using jQuery 1.4.4 in asp.net
   </title>
   <style type="text/css">
       html, body
       {
           font-family: Verdana;
           font-size: 11px;
           margin: 10px;
       }
       #Effect
       {
           border: 1px solid #eaeaea;
           background-color: #f2faf3;
           width: 200px;
           min-height: 150px;
           padding: 10px;
       }
   </style>
   <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.4.min.js" type="text/javascript"></script>
   <script language="javascript">
       $(document).ready(function () {
           jQuery('#<%=tbClick.ClientID %>').click(function (eh) {
               $('#Effect').fadeToggle(1000);
               return false;
           });
       });
   </script>
</head>
<body>
   <form id="form1" runat="server">
   <div>
       <h2>
           Display/hide div element with fading effect using jQuery 1.4.4 in asp.net</h2>
       <asp:Button ID="tbClick" runat="server" Text="Click to toggle" />
       <p>
           <div id="Effect">
               Welcome to asptutorial.com<br />
               Author:Aamir Hasan
           </div>
       </p>
   </div>
   
   </form>
</body>
</html>

Output

Download

fadeToggle() Method.zip (1.18 kb)

 

See live demo

Protected by Copyscape Online Plagiarism Tool

Comments (7) -

Aamir Hasan
Aamir Hasan United States
11/14/2010 12:25:22 AM #

if you have alternative solution please add comments below to share with us

potential transformer
potential transformer United States
11/25/2010 12:27:59 PM #

That is some inspirational stuff. Never knew that opinions could be this varied. Thanks for potential transformer all the enthusiasm to offer such helpful information here.

Mahwish Akhtar
Mahwish Akhtar People's Republic of China
12/28/2010 6:13:28 PM #

Its nice and quite, people leaving comments.  its just a perfect, to get your latest information in this blog
keep it up.

sachin
sachin United States
3/22/2012 2:42:50 AM #

so  nice girl  Mahwish   can we be friend. ? this is my  email  sachin_papneja2000@yahoo.com

sachin
sachin India
3/22/2012 2:43:11 AM #

so  nice girl  Mahwish   can we be friend. ? this is my  email  sachin_papneja2000@yahoo.com

sachin
sachin India
3/22/2012 2:43:31 AM #

so  nice girl  Mahwish   can we be friend. ? this is my  email  sachin_papneja2000@yahoo.com

Nike Dunks High
Nike Dunks High People's Republic of China
3/23/2012 12:44:29 AM #

www.cheap-nikedunksb.com/nike-dunks-high-c-79.html    Nike Dunks High
www.cheap-nikedunksb.com/nike-dunks-low-c-74.html     Nike Dunks Low

Pingbacks and trackbacks (1)+

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Advertizement 1
Advertizement 2
Advertizement 3
Advertizement 4
Advertizement 5