Title: SelectizeJS on Dropdown
Last modified: April 20, 2018

---

# SelectizeJS on Dropdown

 *  Resolved [neilgee](https://wordpress.org/support/users/neilgee/)
 * (@neilgee)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/selectizejs-on-dropdown/)
 * Hi,
    I am trying to use selectize js on TablePress select field but it is not
   applying – i think I need my js to load after TablePress but when I set to a 
   priority of many 9’s I cannot load my js after TablePress.
 * Is there a better way?

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/selectizejs-on-dropdown/#post-10202723)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * I’m not sure which select field you mean here. Can you please post a link to 
   the page with the table where this problem happens, so that I can take a direct
   look? Thanks!
 * Regards,
    Tobias
 *  Thread Starter [neilgee](https://wordpress.org/support/users/neilgee/)
 * (@neilgee)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/selectizejs-on-dropdown/#post-10203709)
 * The select field that shows x number of entries just above table on left [http://cranlana.org.au/advanced-symposia/](http://cranlana.org.au/advanced-symposia/)
 *  Thread Starter [neilgee](https://wordpress.org/support/users/neilgee/)
 * (@neilgee)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/selectizejs-on-dropdown/#post-10203867)
 * My js is [http://cranlana.org.au/wp-content/themes/cranlara/js/global.js?ver=2.0.4](http://cranlana.org.au/wp-content/themes/cranlara/js/global.js?ver=2.0.4)
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years ago](https://wordpress.org/support/topic/selectizejs-on-dropdown/#post-10205462)
 * Hi,
 * ok, I see. I’m sure what the JS library can help with on that select box, but
   from what I can see, you’ll need to make sure that it runs after the DataTables
   JS.
 * For that, you could maybe experiment with running your code after a short delay(
   using `setTimeout` in your JS code), or by enqueuing it in the hook `wp_print_footer_scripts`
   with a priority bigger than 11.
 * Regards,
    Tobias
 *  Thread Starter [neilgee](https://wordpress.org/support/users/neilgee/)
 * (@neilgee)
 * [8 years ago](https://wordpress.org/support/topic/selectizejs-on-dropdown/#post-10205655)
 * Thanks Tobias.
 *  Thread Starter [neilgee](https://wordpress.org/support/users/neilgee/)
 * (@neilgee)
 * [8 years ago](https://wordpress.org/support/topic/selectizejs-on-dropdown/#post-10206131)
 * This is the code I used if anyone finds helpful…
 *     ```
       add_action( 'wp_print_footer_scripts', 'selectjs_table', 12 );
   
       function selectjs_table() {
           ?>
           <script>
               jQuery(document).ready(function($) {
   
                   $('.dataTables_length select').selectize({
                       create: true,
                       sortField: 'text'
                   });
   
               });
           </script>
   
           <?php
       }
       ```
   
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years ago](https://wordpress.org/support/topic/selectizejs-on-dropdown/#post-10206396)
 * Hi,
 * nice! Good to hear that you found a solution!
 * Best wishes,
    Tobias

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

The topic ‘SelectizeJS on Dropdown’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/selectizejs-on-dropdown/#post-10206396)
 * Status: resolved