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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:17:32+00:00 2026-06-12T10:17:32+00:00

I am having issues determining if a particular dom object is visible or not.

  • 0

I am having issues determining if a particular dom object is visible or not. I have the following code outputting to the console and it always returns false even though I can see the element on the screen.

console.log(itemElement.innerText +" is visible: " + $(itemElement.id).is(':visible'));

The context that I am testing is to see whether a list item in a jQuery Accordion object is visible or not. I am iterating through all the list elements (including sub list elements) and performing this check. Always the check returns false. I have googled everywhere for an answer but couldn’t find one.

Here is the html to show what the layout looks like. I have edited it a bit to keep it reasonable but you should get a good idea of how it is set up.

<div id="collection_form">
  <div id="element_container">
    <ul class="element_list element_group ui-sortable">
       <li id="de_1" class="element_group_parent eg-collapsed element_group_leaf">
          stuff in here is same as below
       </li>
       <li id="de_29" class="element_group_parent eg-collapsed element_group_leaf">
         <div>
           <span>Room Booking</span>
           <span class="element_type"> - Group</span>
           <span class="remove_element">remove</span>
           <div style="clear:both"></div>
         </div>
         <ul class="element_group">
           <li id="de_30" class="element_config_form element_group_leaf">
              <div>
                <span>Room Number</span>
                <span class="element_type"> - Text</span>
                <span class="remove_element">remove</span>
                <div style="clear:both"></div>
              </div>
           </li>
         </ul>
      </li>
      <li id="de_31" class="element_group_parent eg-collapsed element_group_leaf">
        <div></div>
        <ul class="element_group">
          <li id="de_32" class="element_config_form element_group_leaf">
              <div> more stuff </div>
          </li>
        </ul>
      </li>
    </ul>
  </div>
</div>

What is it that I am doing wrong?

  • 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-12T10:17:33+00:00Added an answer on June 12, 2026 at 10:17 am

    Try this :

     $(itemElement).is(':visible');  // this works if itemElement is a DOM element, or even if itemElement is a jQuery wrapped DOM elemenent
    

    i suspect your itemElement.id is undefined

    But if itemElement.id is correctly defined (as the id of your itemElement, in this case means that itemElement is a DOM element) you can do both these :

    $("#"+itemElement.id).is(':visible');
    

    or even better :

    $(itemElement).is(':visible');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im having issues getting this to work, maybe its not even possible? I have
I was having trouble determining what was cause my form to not submit when
Having issues displaying some websites within iframes. Live example of code This one works.
I having issues exporting a GridView to Excel for some reason. I have two
Im having issues getting below code to convert to query and work: The original
I have been having issues calling a background image in my CSS file. The
im having issues with the following interface and a class: public interface IRelated {
I'm having issues with the following situation: leeftijd:function(){ var testvar = untouched; var d
I’m having issues with a WPF Expander that I have in a user control
Having issues with this, I'm certain that I'm not grasping something. Let's say I've

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.