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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:03:22+00:00 2026-05-19T15:03:22+00:00

HI I have following problem, i have a ul list like this one <ul

  • 0

HI I have following problem, i have a ul list like this one

<ul class="ul">
    <li id="li1">
        <span class="widget">
            <input name='try1' value="try1" class="param" />
        </span>
        <ul>
            <li class="li2">
                <span class="widget">
                    <input name='try1' value="try1" class="param" />
                    <input name='try2' value="try2" class="param" />
                </span>
            </li>
        </ul>
    </li>
<li id="2"></li>
</ul>

my problem is when i try to get inputs in this way

$('#li1 .param').each(function(){
        alert($(this).attr('name'));
    });

each returns to me
try1
try1
try2
But i need only these ones between span if someone knows how to get them?
Thank you in advance !

  • 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-19T15:03:23+00:00Added an answer on May 19, 2026 at 3:03 pm

    Hard to understand, but I assume you mean that you only want the ones that descend from the child <span> element instead of all <span> elements.

    If so, do this:

    $('#li1 > span .param').each(function(){
        alert($(this).attr('name'));
    });
    

    This uses the the child-selector(docs) to target .param elements that descend from a <span> element that is a child of #li1.

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

Sidebar

Related Questions

I have the following problem: I would like to change value of ExpandableListView's cell
I have an heterogeneous List like the following one: val l = List(1, One,
I have a class that looks like this: typedef std::list<char*> PtrList; class Foo {
I have the following problem: list.c struct nmlist_element_s { void *data; struct nmlist_element_s *next;
I have a problem with following script. It generates a list of places which
I have the following problem in Struts 2. Let's assume i have a class
This can be done in a million ways ... Problem. I have a list
I have long file with the following list: /drivers/isdn/hardware/eicon/message.c//add_b1() /drivers/media/video/saa7134/saa7134-dvb.c//dvb_init() /sound/pci/ac97/ac97_codec.c//snd_ac97_mixer_build() /drivers/s390/char/tape_34xx.c//tape_34xx_unit_check() (PROBLEM)/drivers/video/sis/init301.c//SiS_GetCRT2Data301() /drivers/scsi/sg.c//sg_ioctl()
I have following problem: when my session expires and user clicks on Ajax.Actionlink, Logon
I have following problem: I have built a tabbar application with 4 tabs. I

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.