Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8939409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:49:03+00:00 2026-06-15T10:49:03+00:00

I just tried to find documentation for catcomplete. I need manual for how to

  • 0

I just tried to find documentation for catcomplete. I need manual for how to use _renderItem. I have found this http://jqueryui.com/autocomplete/#categories but seems there is no mention about that only just example for _renderMenu

    _renderMenu: function( ul, items ) {
        var that = this,
            currentCategory = "";
        $.each( items, function( index, item ) {
            if ( item.category != currentCategory ) {
                ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
                currentCategory = item.category;
            }
            that._renderItemData( ul, item );
        });
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:49:04+00:00Added an answer on June 15, 2026 at 10:49 am

    catcomplete is just an example and unfortunately not a part of jQuery UI, so there is no documentation for _renderItem or renderMenu. Think of this as a part of the jQuery source code. However the effect can very easily be reproduced from the source code.

    To use catcomplete, we need to simply ensure that both a label and category value are passed to catcomplete as demonstrated:

    var data = [
        { label: "anders", category: "" },
        { label: "andreas", category: "" },
        { label: "antal", category: "" },
        { label: "annhhx10", category: "Products"},
        { label: "annk K12", category: "Products" },
        { label: "annttop C13", category: "Products" },
        { label: "anders andersson", category: "People" },
        { label: "andreas andersson", category: "People" },
        { label: "andreas johnson", category: "People" }
    ];
    

    Items with a blank string as a category will be not be put into a category and left as with the standard autocomplete. Those given a category will be sub-menued under that category.

    Fiddle here (of the jQuery example)


    To add a class to each item you can simply append .addClass(item.category) to the end of the last line of code in the catcomplete widget:

    that._renderItemData( ul, item ).addClass(item.category);
    

    updated fiddle here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just for learning's sake, I tried in java doc but I did not find
I just tried to run my test app and I got this error: 2012-06-16
I just tried disassembling some shellcode using disasm and I found the following statement
I just tried the tooltip like this Easy image preview ... But i cant
I have tried a lot of things to make this work, but it is
Any DevExpress control I use, just renders a list. I’ve tried all 3 possible
I have been trying to find an answer to this question for months, but
This is just a very simple question to which i can't find a good
I have been looking around for an answer to this, but couldn't really find
Just tried some small graphics application of mine on Windows 7, and I'm getting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.