Frameworks| Hibernate| Struts| JSF| JavaFX| Ajax| Spring| DOJO| JDO| iBatis| Questions?
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments

jQuery To Fade Effects tabs

                         

In this JQuery tutorial we will develop a program  to make Fade Effect  tabs 

Steps to develop the simple tabs .

Step 1:

 

 

 

Create a new file (fadeEffectTab.html) and add the following code into it:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">

<title>Tabs</title>

<script src="script/jquery-1.1.3.1.pack.js" type="text/javascript"></script>
<script src="script/jquery.history_remote.pack.js" type="text/javascript"></script>
<script src="script/jquery.tabs.pack.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {

$('#div-1').tabs({ fxFade: true, fxSpeed: 'slow' });

});
</script>

<link rel="stylesheet" href="style/tab.css" type="text/css" media="print, projection, screen">


</head>
<body>


<h2>Simple Tabs</h2>

<div id="div-1">
<ul>
<li><a href="#T-1"><span>One</span></a></li>
<li><a href="#T-2"><span>Two</span></a></li>
<li><a href="#T-3"><span>Three</span></a></li>
</ul>
<div id="T-1">
<p>First tab</p>

</div>
<div id="T-2">
Second Tab
</div>
<div id="T-3">
Third Tab
</div>
</div>



</body>
</html>

Program explanation:

The following code includes the jQuery JavaScript library file:

<script src="script/jquery-1.1.3.1.pack.js" type="text/javascript"></script>
<script src="script/jquery.history_remote.pack.js" type="text/javascript"></script>
<script src="script/jquery.tabs.pack.js" type="text/javascript"></script>

The Style Css library file

<link rel="stylesheet" href="style/tab.css" type="text/css" media="print, projection, screen">:

The Code

$('#div-1').tabs({ fxFade: true, fxSpeed: 'slow' });

 This tabs(fxSlide: true) function  having two attributes "fxFade" and "fxSpeed" if  "fxFade" set "true" then it show fading of tab content and 

"fxSpeed" is fading effect is set to "slow".

"div-1" having fragments id "T-1","T-2","T-3" is working.

 

 Output:

After click on the Tab "Two" Fading Effect Show

   

Check online demo of the application

 

                         

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Tell A Friend
Your Friend Name

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.