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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:31:51+00:00 2026-06-14T15:31:51+00:00

How would I add another element to be evaluated by value to this statement?

  • 0

How would I add another element to be evaluated by value to this statement?

if ($(this).val() == 1 && !$(this).data("priority1"))?

I’d like to use class as the selector for this new element (In this particular case class=”complaint” and one of the values is “Too_small”)

I’ve tried (both with & without brackets)

if ($('.complaint').val() === "Too_small" && $(this).val() == 1 && !$(this).data("priority1")) 

I’ve included the function below, and a fiddle with a working example http://jsfiddle.net/chayanyc/Dhaat/225/

var $priority1 = $(".priority1");
$(".features_rank1").change(function() {
    var name = $(this).data("name"); //get priority name
    if ($(this).val() == 1 && !$(this).data("priority1")) {
        //rank is 1, and not yet added to priority list
        $("<option>", {text:name, val:name}).appendTo($priority1);
        $(this).data("priority1", true); //flag as a priority item
    }
    if ($(this).data("priority1") && $(this).val() != 1) {
        //is in priority list, but now demoted
        $("option[value=" + name + "]", $priority1).remove();
        $(this).removeData("priority1"); //no longer a priority 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-14T15:31:53+00:00Added an answer on June 14, 2026 at 3:31 pm

    Try:

    $(".complaint select").val()
    

    You need the value of the select tag under the .complaint class.

    However, you have two element with the class of .complaint, so you’ll need to figure out which one you want.

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

Sidebar

Related Questions

I would like to add another background image to my div element, however I
For my web-application I would like to add an object before another object inside
can I add a CCK image field to another CCK field ? I would
I'd like to write a gmail extension that would add a button on the
I'm using Elmah with ASP.NET and wondering how I would add custom data, such
I want to stringify a number and add zero-padding, like how printf(%05d) would add
I would like to create a scrollview inside of another view. I put a
I would like to add to the end of an XML file using python.
I thought every time you do a flash[:notice]=Message it would add it to the
I don't understand how using a 'challenge token' would add any sort of prevention:

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.