Title: [Plugin: jQuery UI Widgets] where do I put the option code?
Last modified: August 20, 2016

---

# [Plugin: jQuery UI Widgets] where do I put the option code?

 *  [crj123082](https://wordpress.org/support/users/crj123082/)
 * (@crj123082)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-jquery-ui-widgets-where-do-i-put-the-option-code/)
 * Hello,
 * I would like to change my accordion instances so they are collapsible…where do
   I need to change code to do this?
 * I’ve tried adding the following to my theme, in header.php and index.php:
 *     ```
       <script>
       	$(function() {
       		$( ".selector" ).accordion({ active: false });
       		$( ".selector" ).accordion({ collapsible: true });
       		$( ".selector" ).accordion({ autoHeight: false });
       	});
       </script>
       ```
   
 * but it doesn’t seem to be working.
 * Thanks!
 * [http://wordpress.org/extend/plugins/jquery-ui-widgets/](http://wordpress.org/extend/plugins/jquery-ui-widgets/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [David Gwyer](https://wordpress.org/support/users/dgwyer/)
 * (@dgwyer)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-jquery-ui-widgets-where-do-i-put-the-option-code/#post-3056676)
 * Hi,
 * Try this. Just tested it on my local install and works fine. Make sure the ‘.
   selector’ is correct, i.e. your opening accordion div tag is <div class=”selector”
   >
 *     ```
       $( ".selector" ).accordion({
       			collapsible: true
       });
       ```
   
 * Add the code in the Plugin settings page in the accordion text box.
 *  Thread Starter [crj123082](https://wordpress.org/support/users/crj123082/)
 * (@crj123082)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-jquery-ui-widgets-where-do-i-put-the-option-code/#post-3056693)
 * Thanks so much for the help, I got it working!
 * One other thing I’ve noticed, though, is that even if I don’t set autoHeight 
   to false (and even if I explicitly set it to true), it does not seem to be adjusting
   the height accordingly…some sections have a scroll bar, while others have a lot
   of whitespace. Do you know if there’s any way to fix this?
 *  Plugin Author [David Gwyer](https://wordpress.org/support/users/dgwyer/)
 * (@dgwyer)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-jquery-ui-widgets-where-do-i-put-the-option-code/#post-3056694)
 * I can’t think of any reason why the autoheight is doing that. One thing I have
   learnt about using jQuery UI widgets is that the JS code is easier to get right
   than the CSS!
 * By the way I am working on an updated version to this Plugin which is basically
   a complete rewrite. It will be much easier to add jQuery code and, will include
   support for ALL jQuery UI features shipped with WordPress, not just a select 
   few. 🙂
 *  [webreid](https://wordpress.org/support/users/webreid/)
 * (@webreid)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-jquery-ui-widgets-where-do-i-put-the-option-code/#post-3056716)
 * Hello,
 * It seems as though I have it right, but it’s not working.
 * Any suggestions please?
 * [easyrotator]erc_6_1349983050[/easyrotator]
 *  
 * <div class=”selector”>
    - [Tab 1](https://wordpress.org/support/topic/plugin-jquery-ui-widgets-where-do-i-put-the-option-code/?output_format=md#accordion-1)
    - [Tab 2](https://wordpress.org/support/topic/plugin-jquery-ui-widgets-where-do-i-put-the-option-code/?output_format=md#accordion-2)
    - [Tab 3](https://wordpress.org/support/topic/plugin-jquery-ui-widgets-where-do-i-put-the-option-code/?output_format=md#accordion-3)
 *  <div id=”accordion-1″>
    <p>This is tab one.</p> </div> <div id=”accordion-2″
   > <p>This is tab two.</p> </div> <div id=”accordion-3″> <p>This is tab one.</
   p> </div> </div>
 * I’m using the collapsible above to crj123082
 * It’s at [http://webreid.com/allodium](http://webreid.com/allodium)
 * Thank you.
 *  Plugin Author [David Gwyer](https://wordpress.org/support/users/dgwyer/)
 * (@dgwyer)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-jquery-ui-widgets-where-do-i-put-the-option-code/#post-3056717)
 * Just add valid accordion code and make sure the correct selector is set in Plugin
   options.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘[Plugin: jQuery UI Widgets] where do I put the option code?’ is closed
to new replies.

 * ![](https://ps.w.org/jquery-ui-widgets/assets/icon.svg?rev=1430096)
 * [jQuery UI Widgets](https://wordpress.org/plugins/jquery-ui-widgets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jquery-ui-widgets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jquery-ui-widgets/)
 * [Active Topics](https://wordpress.org/support/plugin/jquery-ui-widgets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jquery-ui-widgets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jquery-ui-widgets/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [David Gwyer](https://wordpress.org/support/users/dgwyer/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-jquery-ui-widgets-where-do-i-put-the-option-code/#post-3056717)
 * Status: not resolved