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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:18:59+00:00 2026-05-28T08:18:59+00:00

$(‘#mapid’).val($(.firstbox ul li:nth-child( + mapi + )).class()); is returning an undefined error that loops

  • 0

$('#mapid').val($(".firstbox ul li:nth-child(" + mapi + ")").class()); is returning an undefined error that loops indefinitely…

I even tried doing: $('#mapid').val($(".firstbox ul li:nth-child(2)").class()); and the same error occurs.

The elements undoubtedly exist, and the script is positioned at the bottom of the page. No, I do not use WordPress (I saw that was a common theme regarding the error).

Here is the HTML:

<div id="map-box" class="firstbox">
        <ul>
                        <li class="14" id="thelimit">
                <div class="left">
                    <h1>The Limit</h1>
                    <span class="inf">A branching map. A mix-n match of alot of themes into one map.                    <p>Recommended Players: 3<br />
                    Author: <a href="http://www.minecraftforum.net/user/18586-timetoslide/" target="_new">timetoslide</a></p></span>
                </div>

                <div class="right" style="position: relative">
                    <div style="width: 250px; height: 120; z-index: 6; position: absolute; top: 0px; height: 120px; left: 35px; cursor: pointer" class="righthover"></div>
                    <div style="background: url('maps/thelimit.jpg'); width:250px;height:150px;overfow:hidden;border:none;position: relative; z-index: 1">
                    <div style="background: url('img/vignette.png') no-repeat center center; width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; z-index: 2"></div>
                        <div class="seeList" style="width: 100%; height: 100%; background: url(img/cbg.png) repeat; color: white; font-family: Georgia, 'Times New Roman'; font-size: 24px; margin: 0; padding: 0; font-style: italic; text-align: center; z-index: 1; display: none;"><div style="padding: 20px; padding-top: 40px;">See full list of maps...</div></div>
                        <img src="img/border.png" style="z-index: 3" />
                        <div class="directions" style="z-index: 5"></div>
                    </div>
                </div>
            </li>
                    <li class="13" id="lavaseaofsurvival">
                <div class="left">
                    <h1>Lava Sea of Survival</h1>
                    <span class="inf">Try to survive by using only the resources provided. Did we mention you're floating above lava?                    <p>Recommended Players: 4<br />
                    Author: <a href="http://www.minecraftforum.net/user/1021295-meh-own/" target="_new">Meh_Own</a></p></span>
                </div>

                <div class="right" style="position: relative">
                    <div style="width: 250px; height: 120; z-index: 6; position: absolute; top: 0px; height: 120px; left: 35px; cursor: pointer" class="righthover"></div>
                    <div style="background: url('maps/lavaseaofsurvival.jpg'); width:250px;height:150px;overfow:hidden;border:none;position: relative; z-index: 1">
                    <div style="background: url('img/vignette.png') no-repeat center center; width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; z-index: 2"></div>
                        <div class="seeList" style="width: 100%; height: 100%; background: url(img/cbg.png) repeat; color: white; font-family: Georgia, 'Times New Roman'; font-size: 24px; margin: 0; padding: 0; font-style: italic; text-align: center; z-index: 1; display: none;"><div style="padding: 20px; padding-top: 40px;">See full list of maps...</div></div>
                        <img src="img/border.png" style="z-index: 3" />
                        <div class="directions" style="z-index: 5"></div>
                    </div>
                </div>
            </li>
[etc...]
  • 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-28T08:18:59+00:00Added an answer on May 28, 2026 at 8:18 am

    There may by multiple elements in your code having class=firstbox, and some of which may not have the element you are trying to access.

    In your case you can try child() function to refer to child element of element having id map-box, which may solve your problem.

    http://api.jquery.com/children/

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

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
I am trying to create a RegEx expression that will successfully parse the following
Hi if i run my project its indicate this logcat error...how to solve this
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I downloaded PostgreSQL from the official website and ran the .dmg installer. After that
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from

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.