Using setTimeout to Delay Showing Event-Delegation Tooltips Tab Navigation with Smooth Horizontal Sliding Using jQuery
Get Paid For Reading and Sharing articles
Jan 04
   Related News :

Customize the header icons with the icons option, which accepts classes for the header’s default and selected (open) state. Use any class from the UI CSS framework, or create custom classes with background images.

Make the selected elements Accordion widgets. Semantic requirements:

The markup of your accordion container needs pairs of headers and content panels. By default, the header elements are anchors, assuming the following structure:

<div id="accordion">
    <a href="#">First header</a>
    <div>First content</div>
    <a href="#">Second header</a>
    <div>Second content</div>
</div>

If you use a different element for the header, specify the header-option with an appropriate selector, eg. header: ‘h3′. The content element must be always next to its header.

If you have links inside the accordion content and use a-elements as headers, add a class to them and use that as the header, eg. header: ‘a.header’.

Use activate(Number) to change the active content programmatically.

NOTE: If you want multiple sections open at once, don’t use an accordion

An accordion doesn’t allow more than one content panel to be open at the same time, and it takes a lot of effort to do that. If you are looking for a widget that allows more than one content panel to be open, don’t use this. Usually it can be written with a few lines of jQuery instead, something like this:

jQuery(document).ready(function(){
	$('.accordion .head').click(function() {
		$(this).next().toggle();
		return false;
	}).next().hide();
});

Or animated:

jQuery(document).ready(function(){
	$('.accordion .head').click(function() {
		$(this).next().toggle('slow');
		return false;
	}).next().hide();
});

The jQuery UI Accordion plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.

If a deeper level of customization is needed, there are widget-specific classes referenced within the ui.accordion.css stylesheet that can be modified. These classes are highlighed in bold below.

Sample markup with jQuery UI CSS Framework classes

<div class=”ui-accordion ui-widget ui-helper-reset”>
<h3 class=”ui-accordion-header ui-helper-reset ui-state-active ui-corner-top”>
<span class=”ui-icon ui-icon-triangle-1-s”/>
<a href=”#”>Section 1</a>
</h3>
<div class=”ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active“>
Section 1 content
</div>
<h3 class=”ui-accordion-header ui-helper-reset ui-state-default ui-corner-all”>
<span class=”ui-icon ui-icon-triangle-1-e”/>
<a href=”#”>Section 2</a>
</h3>
<div class=”ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom”>
Section 2 content
</div>
<h3 class=”ui-accordion-header ui-helper-reset ui-state-default ui-corner-all”>
<span class=”ui-icon ui-icon-triangle-1-e”/>
<a href=”#”>Section 3</a>
</h3>
<div class=”ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom”>
Section 3 content
</div>
</div>
Note: This is a sample of markup generated by the accordion plugin, not markup you should use to create a accordion. The only markup needed for that is
<div>
<h3><a href=”#”>Section 1</a></h3>
<div>
Section 1 content
</div>
<h3><a href=”#”>Section 2</a></h3>
<div>
Section 2 content
</div>
<h3><a href=”#”>Section 3</a></h3>
<div>
Section 3 content
</div>
</div>.

20 Most Popular Search Terms :

Related Post :

  • » Several Ways Of Making Money From Home
  • » Detecting Ajax Events on the Server
  • » The Year of jQuery UI
  • » jQuery Documentation Alternatives
  • » Introducing of $(document).ready()
  • » Add Jquery Easing to Your Animations
  • » Tab Navigation with Smooth Horizontal Sliding Using jQuery
  • Leave a Reply

    Spam Protection by WP-SpamFree

    Sign up for PayPal and start accepting credit card payments instantly. Web Design Top Web design blogs Blog Directory My Zimbio Web Development & Design Blogs - Blog Top Sites web site traffic bali web programmer and web maintenance service Add to Google Blog Advertising
    Web Development & Design - Top Blogs Philippines Add to Technorati Favorites
    eXTReMe Tracker