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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:46:14+00:00 2026-05-15T11:46:14+00:00

I have this HTML: <div id=main><div id=mainly>11</div><div id=mainly>22</div></div> I want to select the div

  • 0

I have this HTML:

<div id="main"><div id="mainly">11</div><div id="mainly">22</div></div>

I want to select the div with value 11.How to do this?
I tried:

$("<div id="mainly">11</div>")

,but it didn’t work…
I don’t have only two divs with id=”mainly”.

  • 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-15T11:46:15+00:00Added an answer on May 15, 2026 at 11:46 am

    I don’t have only two divs with id=”mainly”

    But you should have only one div with the id “mainly” !

    DOM identifiers have to be unique in order to create a “well formed” and valid markup.

    So, we just assume you’are using classes instead of ids.

    $('.mainly:contains(11)').fadeOut('fast');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In the below shown html i have this main div as cxfeeditem feeditem and
I have this HTML code: <div id=main> <div id=dv_7>...</div> <div id=dv_1>...</div> <div id=dv_8>...</div> <div
I have this simple html structure: <div id=mainbody> <div id=main> ... </div> <div id=left>
I have a some html that looks like this <div id=main> <div id=sub_main_1 class=sub_main>
Hi everyone in my main html file, I have this div that some img
I have this html: <div id=main> //contents </div> and this css: #main { padding:10px;
I have this HTML: <div class=row-fluid list-item-main-euvou-entradas> <div class=span1 list-item-main-euvou-entradas-colorcode green></div> <div class=span1 list-item-main-euvou-entradas-rank>1</div>
I have this piece of html code: <div id=main style= margin:0 auto; > <div
I have this in html code: <select name=t id=t> <option value=6>test2</option> <option value=0>Overall</option></select> <select
I have a simple HTML page that looks like this: ...<div id="main"> <a href="#">Click

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.