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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:10:38+00:00 2026-06-15T04:10:38+00:00

This is part of some HTML from which I need to retrieve a piece

  • 0

This is part of some HTML from which I need to retrieve a piece of data. The HTML is assigned to a variable called fullDescription.

<p>testing</p>
<div class="field field-type-text field-field-video-short-desc">
    <div class="field-label">Short Description:&nbsp;</div>
    <div class="field-items">
        <div class="field-item odd">
                Demonstrates the basics of using the Content section of App Cloud Studio        
        </div>
    </div>
</div>
<div class="field field-type-text field-field-video-id">
    <div class="field-label">Video ID:&nbsp;</div>
    <div class="field-items">
            <div class="field-item odd">
                    1251462871001        
            </div>
    </div>
</div>

I wish to retrieve the video ID number (1251462871001). I was thinking something like this:

var videoID = $(fullDescription).find(".field.field-type-text.field-field-video-id").find(".field-item.odd").html();

Although it does not generate any syntax errors, it does not retrieve the number.

Thanks for helping out a jQuery noob!

-Matt

  • 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-06-15T04:10:39+00:00Added an answer on June 15, 2026 at 4:10 am

    You don’t need so many selectors, try:

    var videoID = $(fullDescription).find(".field-field-video-id .field-item.odd").html();
    

    I was lazy and my above code was just to show you don’t need so many selectors. After spending some time to figure this out, I have a solution:

    var videoID = $(fullDescription).filter('.field-field-video-id').find('.odd').html();
    

    Filter is the best way in jQuery to sort through a string that is actually HTML. Once you have that, you’re dealing with an HTML object and can use find.

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

Sidebar

Related Questions

For some reasons this part where I fetch JSON data from following url will
This is part of some instructions that I was given from a website helping
This question has two parts. Part 1. Yesterday I had some code which would
I have this part of script from my GAE application which uses webapp2, which
I need to obtain the code from a web, which is in part pure
I was reading this question, but didn't understand some part of the aix's answer
This is really a two part question: I'm seeing some users in the Grantee
I'm working on some HTML content as part of an iPad app. We may
I need some help in bison grammar construction. From my another question: I'm trying
I need a Javascript sample which reads contents from a url and creates a

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.