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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:11:12+00:00 2026-05-28T17:11:12+00:00

Ok, lets see if I can explain this clearly enough here. My HTML looks

  • 0

Ok, lets see if I can explain this clearly enough here.
My HTML looks like

<li>
    <div class="info_left" rel="snack">Fries</div>
    <div class="info_right">
        <span class="info_remove">[Remove]</span>
        <span class="info_favorite">[Favorite]</span>
    </div>
</li>
<li>
    <div class="info_left" rel="lunch">Burger</div>
    <div class="info_right">
        <span class="info_remove">[Remove]</span>
        <span class="info_favorite">[Favorite]</span>
    </div>
</li>
<li>
    <div class="info_left" rel="4thmeal">Taco</div>
    <div class="info_right">
        <span class="info_remove">[Remove]</span>
        <span class="info_favorite">[Favorite]</span>
    </div>
</li>

If you will note you will see a “Remove” and “Favorite” inside a div “info_right”. What I need to do when either one of those 2 options is clicked on is get the rel and text values of the same li’s “info_left” div. I’ve tried a few ways but don’t think I’m nailing the combo between parent(s), siblings correctly or I dunno. Either way hoping someone can toss me a bone.

  • 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-28T17:11:13+00:00Added an answer on May 28, 2026 at 5:11 pm

    It should just be:

    $('.info_remove,.info_favorite').on('click', function() {
       var $left = $(this).parent().siblings('.info_left');
       var rel = $left.attr('rel');
       var txt = $left.text();
       ...
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I will see if I can explain this clearly enough. I have 2 web
Let's see if I can explain myself, I have this models: class BillHeader(models.Model): number
Lets see if I can explain this. I am displaying a table in PHP
ok, lets see if i can explain this. i have a List<Games> _Games =
I screwed up my last post. Lets see if I can get this one
Here's a coding problem for those that like this kind of thing. Let's see
Okay, let's see if I can explain what I mean, here's an image to
Let's see if I can explain this properly. I am (unfortunately) using Access. I
Ok, let's see if I can make this make sense. I have a program
Ok this is hard to explain, but here goes. I have a 3D list

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.