How to add multilevel accordion in wordpress using jQuery UI -
i'm trying add multilevel accordion wordpress site. made fiddle here working in wordpress multilevel not working ! show first level multilevel showing. please help.
i want use wordpress jquery library , add jquery ui theme function.php
add bellow code
function add_jquery_ui() { wp_enqueue_script( 'jquery-ui-core' ); wp_enqueue_script( 'jquery-ui-accordion' ); } add_action( 'wp_enqueue_scripts', 'add_jquery_ui' );
then add code theme footer.php
before </body>
section
jquery(function($) { $(".lifetime-faq").accordion({ autoheight: false, collapsible: true, active: false }); $(function () { var icons = { header: "iconclosed", // custom icon class activeheader: "iconopen" // custom icon class }; $(".lifetime-faq").accordion({ icons: icons }); }); });
Comments
Post a Comment