Title: TypeError: jQuery(&#8230;).selectize is not a function
Last modified: September 1, 2016

---

# TypeError: jQuery(…).selectize is not a function

 *  [richterd](https://wordpress.org/support/users/richterd/)
 * (@richterd)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/typeerror-jqueryselectize-is-not-a-function/)
 * Hi,
    if we use wp_enqueue_media() in our own plugin in order to use the WordPress
   ajax media library, then we get the “selectize is not a function” error, as your
   script is not loaded. Can you please enqueue the styles and scripts in a way 
   that makes them work with an ajax media library, because currently they are only
   enqueued on the upload.php page.
 *     ```
       public static function admin_enqueue_scripts() {
       	global $pagenow;
       	if ( $pagenow == 'upload.php' ) {
       		Groups_UIE::enqueue( 'select' );
       	}
       }
       ```
   
 * [https://wordpress.org/plugins/groups/](https://wordpress.org/plugins/groups/)

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

 *  [gtsiokos](https://wordpress.org/support/users/gtsiokos/)
 * (@gtsiokos)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/typeerror-jqueryselectize-is-not-a-function/#post-7631081)
 * Hi richterd,
 * You should also need Groups_UIE::render_select(‘.class_name_of_the_select_tag’);
   
   or Groups_UIE::render_select(‘#id_name_of_the_select_tag’); right after the select
   tag is inserted.
 * Cheers
 *  Thread Starter [richterd](https://wordpress.org/support/users/richterd/)
 * (@richterd)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/typeerror-jqueryselectize-is-not-a-function/#post-7631082)
 * Are we talking about the same problem?
    My issue is, that the selectize script
   which is used by the Groups plugin is only enqueued on the “upload.php” page.
   But if you use the media library in other places, $pagenow is not equal to “upload.
   php” and then the script is missing.
 *  [jitgohil](https://wordpress.org/support/users/jitgohil/)
 * (@jitgohil)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/typeerror-jqueryselectize-is-not-a-function/#post-7631089)
 * Hi Guys,
 * Any resolution on this? I’m running into the same issue using a custom post-type
   for our plugin.
 * Is there a simple workaround if not an updated fix?
 * Thanks!
 *  [gtsiokos](https://wordpress.org/support/users/gtsiokos/)
 * (@gtsiokos)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/typeerror-jqueryselectize-is-not-a-function/#post-7631091)
 * Hi,
 * I managed to replicate the issue on my installation.
    If you choose the custom
   post type you created under Groups > Options, the issue is resolved.
 * Cheers,
    George
 *  [studioleland](https://wordpress.org/support/users/studioleland/)
 * (@studioleland)
 * [9 years ago](https://wordpress.org/support/topic/typeerror-jqueryselectize-is-not-a-function/#post-8949666)
 * Using Groups Restrict Categories. Just recently I am experiencing the same error.
   I’ve disabled all other plugins but this error remains and all JS on the page
   dies.
 * Any assistance greatly appreciated!
 * Error on Download Categories > Edit Category admin screen:
 *     ```
       term.php?taxonomy=wpdmcategory&tag_ID=498&post_type=wpdmpro&wp_http_referer=%2Fwp-admin%2Fedit-tags…:712 
   
       Uncaught TypeError: jQuery(...).selectize is not a function
           at HTMLDocument.<anonymous> (term.php?taxonomy=wpdmcategory&tag_ID=498&post_type=wpdmpro&wp_http_referer=%2Fwp-admin%2Fedit-tags…:712)
           at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.7.3:2)
           at Object.fireWith [as resolveWith] (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.7.3:2)
           at Function.ready (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.7.3:2)
           at HTMLDocument.K (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.7.3:2)
       ```
   

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

The topic ‘TypeError: jQuery(…).selectize is not a function’ is closed to new replies.

 * ![](https://ps.w.org/groups/assets/icon-256x256.png?rev=983146)
 * [Groups](https://wordpress.org/plugins/groups/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/groups/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/groups/)
 * [Active Topics](https://wordpress.org/support/plugin/groups/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/groups/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/groups/reviews/)

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [media library](https://wordpress.org/support/topic-tag/media-library/)
 * [media uploader](https://wordpress.org/support/topic-tag/media-uploader/)

 * 5 replies
 * 4 participants
 * Last reply from: [studioleland](https://wordpress.org/support/users/studioleland/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/typeerror-jqueryselectize-is-not-a-function/#post-8949666)
 * Status: not resolved