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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:23:10+00:00 2026-05-28T05:23:10+00:00

Question i asked earlier along the same lines – jQuery – Selecting a child

  • 0

Question i asked earlier along the same lines – jQuery – Selecting a child div background image and amending it. Definitely helped but im trying to simplify it down to this selector if possible.

Im looking for a way to select a child div with a class of “portlet-arrow” and get the current background-image url.

So what i need is this.

On click of the div with id “what is crm head” i need a selector that can find the child div with a class of portlet arrow and get the current background image url.

The closest i have got is this:

$( ".portlet-header" ).click(function() {
    var currValue = $(this).children(".portlet-arrow").css("background-image")
});

Here is my current html

<div class="portlet" id="what-is-crm">
    <div class="portlet-header header-styling" id="what-is-crm-head">
        <div class="portlet-arrow red-arrow-visible"></div>
            What is CRM?
        </div>
        <div class="portlet-content">
        Mauris pretium vehicula suscipit. Donec tincidunt
        volutpat risus, non pulvinar nunc feugiat ac.
        <br />
        <br />
        <a href="#">View More</a>
    </div>
</div>
  • 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-28T05:23:11+00:00Added an answer on May 28, 2026 at 5:23 am

    I think your problem is you are missing the $ when creating a JQuery object for “this”…

    var currValue = $(this).children(".portlet-arrow").css("background-image");
    

    Without the $ sign you will not create a JQuery object, and thus the children function will not be a valid call

    Here is a working example

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

Sidebar

Related Questions

This question was asked earlier by someone else but never answered: MKAnnotation - Map
Related to a question I asked earlier here , I've found a problem which
This is in reference to a question I asked earlier. Aside from viewing the
This is related to this question I asked earlier about syntax highlighting user-defined blocks
I'm re-casting a question I asked earlier now that I have an idea of
This is an attempt to rephrase a question I asked earlier. I'd like to
This is a follow-up question to this question I asked earlier. Btw thanks Neil
Despite an earlier question ( asked here ), our project is constrained to using
This question relates to this question which I asked earlier this week. The answer
You may think this question is like this question asked on StackOverflow earlier. But

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.