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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:31:43+00:00 2026-06-09T10:31:43+00:00

I have this drop down code: $(‘#addDropdown’).click(function() { var $d = $(‘<select class=dropdown><option selected=selected

  • 0

I have this drop down code:

$('#addDropdown').click(function() {
   var $d = $('<select class="dropdown"><option selected="selected" value="null" rel="null">Choose your data!</option><option value="1" rel="2">Option 1</option><option value="1" rel="2">Option 2</option><option value="14" rel="15">Option 3</option></select><input type="number" min="1" max="99" class="multiplier" name="multiplier" value="1" size="3"/><br/>').fadeIn().delay(1000);

   $('#dropdownContainer').append($d);
});

and I’m passing the values to an ajax function with this code, i use a button to append more drop downs with the same values:

    var dropdowns = $(".dropdown"),
        one = [],
        two = [],
        mult = [];

 for(var i = 0; i < dropdowns.length; i++) {
   one.push(dropdowns.eq(i).find('option:selected').attr('rel'));
   two.push(dropdowns.eq(i).val());
   mult.push(dropdowns.eq(i).val() * dropdowns.eq(i).find('input[name=multiplier]').val())
 }

for the multi option I want to take the value attribute that is selected and multiply it with the value from the number input… my selector isn’t working for the input, how can I select that multiplier input??

  • 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-09T10:31:44+00:00Added an answer on June 9, 2026 at 10:31 am

    .find() only finds elements which are descendants of the currently matched set; since you want adjacent elements (siblings), use .next() (probably best in this case) or .siblings():

    for(var i = 0; i < dropdowns.length; i++) {
       one.push(dropdowns.eq(i).find('option:selected').attr('rel'));
       two.push(dropdowns.eq(i).val());
       mult.push(dropdowns.eq(i).val() * dropdowns.eq(i).next('input[name=multiplier]').val())
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have this code: jQuery('div[class=someClass] :input:not(:button)').each(function() { if (input type is drop-down) {
I have this HTML code which simulates a dropdown multi-checkbox <div> <div class=select> <span>Select
I have this drop-down list of countries: <select name=country> <option value=>Country...</option> <option value=Afganistan>Afghanistan</option> <option
I have this code: <div id=wrapf> <div class=dropsf> <select name=f class=food> <option value= rel=>Choose!</option>
I have this code which can display drop down in div tag of html.
I have capture change event on drop down select. This drop down field is
I have this code that adjusts the width of a comboBox drop-down: private void
I have this code on controller side to initialise the drop down List<SelectListItem> items
I have this Code For example: <select > <option value=volvo>Volvo</option> <option value=saab>Saab</option> <option value=mercedes>Mercedes</option>
I have this code here : <select id=test> <option value=1>test1</option> <option value=2 selected=selected>test2</option> <option

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.