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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:24:20+00:00 2026-06-05T19:24:20+00:00

This is my first post and I my first experience with jquery. I have

  • 0

This is my first post and I my first experience with jquery.

I have rendered and created 2 text boxes and 4 check boxes.

each text area has 2 check boxes

How do I create a relationship between these.. so when I am getting the textarea ( which has an id ) I also get the 2 ids for the other two check boxes (I have passed ids for those too) if they are checked.

Thank you.

I hope it makes sense.

There are 2 of the following same

  • 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-05T19:24:21+00:00Added an answer on June 5, 2026 at 7:24 pm

    It’s best to let them have something in common, which you can use to identify a group of elements. There are 2 ways I can come up with right now:

    1. Giving each element the same class after their normal class. for example, class="checkBox1 one" for the checkbox and class="textArea one" for the text area.

    2. Putting them in the same container, in this case a <div> might be best.

    If you use the second one which I prefer you can easily make events that will apply to every one of them:

    HTML:

    <div id="container1" class="container">
     <input class="checkBox1" type="checkbox"/>
     <input class="checkBox2" type="checkbox"/>
     <input type="textarea"/>
    </div>
    

    jQuery:

    $('.container *').click(function(){
        alert('clicking on an element inside ' + $(this).parent().attr('id'));
    });
    

    Which will result in “clicking on an element inside container1”.

    Other example is if you want to empty the <textarea> when a checkbox is clicked:

    $('.container checkbox').click(function(){
       $(this).siblings('textarea').val("");
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first post ever :). I have quite a bit of experience
This is my first post here. I have been reading posts here since I
This is my first post here. I have a problem. I need to take
This is my first JQuery experience and I'm on quite a tight deadline. It's
This is my first post on stackoverflow.com so I will try to be straightforward.
This is my first post here so if I've been mistaken for my post
This is my first post here, so I should probably start by saying thankyou
This is my first post, so please go easy on me if I say
this is my first post here. I'm excited to finally take part. I'm working
This is my first post on Stack Overflow and I'm just wondering on the

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.