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

  • Home
  • SEARCH
  • 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 6658839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:57:37+00:00 2026-05-26T01:57:37+00:00

I am using jQuery selector in an AJAX request call , so according to

  • 0

I am using jQuery selector in an AJAX request call , so according to the value returned by request , I select the required div using :eq() selector, but the problem is that I am stuck with some undefined stuffs

Here is what I wish to do

$('.win7red:eq(9)').parent.children('span:eq(1)').children('div:first').css("opacity", "1");

Here the value in first eq selector has to be variable as per the request

I obtained the value in a javascript variable called req and then I used this, but it shows ERROR

$('.win7red:eq(req)').parent.children('span:eq(1)').children('div:first').css("opacity", "1");

I even tried this, but none of them worked

$var = $('.win7red');
$var1 = $var:eq(req); 
$var1.parent.children('span:eq(1)').children('div:first').css("opacity", "1");

Please help in solving this problem.

  • 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-26T01:57:38+00:00Added an answer on May 26, 2026 at 1:57 am

    Use parent() as a function instead of a property.

    So, $('.win7red:eq(9)').parent( ) …

    Using .parent without parentheses can only be used at DOM objects, such as $("body").get(0).parentNode (=$("body").parent()).

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

Sidebar

Related Questions

I have a problem with selecting not first selector using attributeContains jQuery('div[id*=abc]:not(:first)').hide();
Using a jQuery selector, is it possible to select all elements that are not
I'm using this jQuery selector: $(a[href*='#']).click(function(e) { e.preventDefault(); alert(#valueinhere) }); to select links that
I'm using an ajax call to render a partial. The problem is that when
I am trying to get an element using JQuery's selector, but it does not
I am using JQuery's nth-child selector to alter the margin on every 3rd div
I'm using the modernish jquery 1.5 ajax request. To a page on the same
I'm creating a web application which loads tabs using AJAX. My problem is that
When using the jQuery.ajax() method, I am struggling to filter the data that is
I am using the jQuery $('selector').css('top') to get the top value to help position

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.