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 211411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:05:34+00:00 2026-05-11T18:05:34+00:00

see this demo from jquery ui you have to hold down the Ctrl key

  • 0

see this demo from jquery ui
you have to hold down the Ctrl key to make multiple selections
I really like the code but I don’t want to force my visitor to press ctrl key
I want the code to allow multiple selections without holding ctrl key

is this possible?

  • 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-05-11T18:05:35+00:00Added an answer on May 11, 2026 at 6:05 pm

    I asked you a questions in the comments but I’ll just write up a simple selection solution so you can see what I was thinking.

    So basically you can use the jquery toggle() effect to roll your own selector. When a user clicks you’ll add the orange class, when he clicks again it will remove the orange class.

    $(document).ready( function() {
        $('ul#selectable li').toggle( function() {
            $(this).addClass('orange'); }, function() {
            $(this).removeClass('orange'); } );
    });
    

    Then all your job is to grab all the li elements with the orange class and post them to a form or whatever your end goal is. Haven’t checked this code but what your doing is asking for all the li elements within selectable that have the orange value at the end of the class attribute.

    With the code below I’m creating a new array and then adding the text() value of each “orange li” into it.

    var theSelections = new Array();
    
    $('ul#selectable li[class$="orange"]').each( function(i) {
        theSelections[i] = $(this).text();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 150k
  • Answers 150k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If an attribute is not a tokenized or enumerated type,… May 12, 2026 at 9:44 am
  • Editorial Team
    Editorial Team added an answer I haven't had need to try this myself, but from… May 12, 2026 at 9:44 am
  • Editorial Team
    Editorial Team added an answer Here's one workaround: How to implement an Eager Loading strategy May 12, 2026 at 9:44 am

Related Questions

I have an IE bug that I'm not sure how to fix. Using jQuery
I'll do a demo of my code to slightly non-technical audience, and I need
I am knocking together a WPF demo for our department at work to show
I have a demo database with a couple of hundred tables in it. Each

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.