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

  • SEARCH
  • Home
  • 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 8988149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:57:23+00:00 2026-06-15T21:57:23+00:00

I have two little changes I want to make. var selectedOption = jQuery(#modulesDrop option:selected);

  • 0

I have two little changes I want to make.

            var selectedOption = jQuery("#modulesDrop option:selected");
            selectedOption.appendTo($("#moduleselect"));
            $('option.red').appendTo($("#moduleselect"));
  1. How can I get the selectedOption to be removed from the #moduleDrop and #moduleselect.

  2. I have a class $('option.red') and I only want it to append to #moduleselect if the contents in #moduleselect is empty.

#moduleSelect is a multiple select box while ‘#modulesDrop’ is a drop down menu.

Below is a jsfiddle

http://jsfiddle.net/DfSGE/6/

Simply follow the steps to use fiddle:

  1. You will see a drop down menu, select a course from the drop down menu.
  2. You will see the details of the selected course from the drop down menu are displayed. Click on the “Remove Module” submit button.
  3. Confirm the confirmation box. Nope happens at mo but I want the selected module in the drop down menu to be remove from the drop down menu and from the select box
  • 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-15T21:57:25+00:00Added an answer on June 15, 2026 at 9:57 pm

    “How can I get the selectedOption to be removed from the #moduleDrop and #moduleselect.“

    var selectedOption = $("#modulesDrop").val();
    $("#modulesDrop option[value='" + selectedOption + "']").remove();
    $("#moduleselect option[value='" + selectedOption + "']").remove();​
    

    “I have a class $(‘option.red’) and I only want it to append to #moduleselect if the contents in #moduleselect is empty.“

    $('#moduleselect:not(:has(option))').addClass('red');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, I have a little C library. I want to make this library available
I'm a little new with SQL so bear with me. I have two tables,
I am experiencing a little pain on Android. I have two activities, one is
I've been working on an application for a little over two years and have
I have a little confusion in the following two statements. The below program is
I have this little problem. My client wanted two distinct swf on a web
It's a theorical doubt. Suppouse you have a little library with just two files:
If I have a PHP application which allows users to make changes to documents,
I have two pages, p1.html and p2.html with jQuery Mobile. There is some links
I know very little jquery so please excuse me if I don't make much

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.