You appear to be a bot. Output may be restricted
Description
Display pages styled for jQuery accordionBasically we achieve what we can do manually using bw_jq divs and headings <code> [bw_jq selector=".fadein,.pages" method=accordion script=jquery-ui-accordion] [div class=fadein] <h3>First</h3><div>I am the first part of the accordion</div> <h3><a href='#'>Second</a></h3><div>I am the second part of the accordion</div> <h3>Third</h3><div>I am the third part of the accordion</div> [ediv] </code>
Usage
bw_accordion( $atts, $content, $tag );
Parameters
- $atts
- ( mixed ) optional –
- $content
- ( mixed ) optional –
- $tag
- ( mixed ) optional –
Returns
voidSource
File name: oik/shortcodes/oik-accordion.phpLines:
1 to 24 of 24
function bw_accordion( $atts=null, $content=null, $tag=null ) { oik_require( "includes/bw_posts.php" ); $posts = bw_get_posts( $atts ); if ( $posts ) { oik_require( "shortcodes/oik-jquery.php" ); $debug = bw_array_get( $atts, "debug", false ); bw_jquery_enqueue_script( "jquery-ui-accordion", $debug ); bw_jquery_enqueue_style( "jquery-ui-accordion" ); $selector = bw_accordion_id(); bw_jquery( "#$selector", "accordion" ); $class = bw_array_get( $atts, "class", "bw_accordion" ); sdiv( $class, $selector ); $cp = bw_current_post_id(); foreach ( $posts as $post ) { bw_current_post_id( $post->ID ); bw_format_accordion( $post, $atts ); } ediv( $class ); bw_current_post_id( $cp ); bw_clear_processed_posts(); } return( bw_ret() ); }View on GitHub View on Trac