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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:50:25+00:00 2026-05-25T10:50:25+00:00

Every HTML element has offset values. Can I return an element that has, for

  • 0

Every HTML element has offset values. Can I return an element that has, for example, offsetLeft > 10?

Have never heard of this feature, therefore the question.

I’m aware that this can be done with loops, but those are slow. Had an idea about XPath, but cannot find anything related to properties within reference.

Thanks in advance!

P.S. No need for outdated browser compatibility- HTML5’ish can do.

  • 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-25T10:50:25+00:00Added an answer on May 25, 2026 at 10:50 am

    As far as I’m aware, there is no way to do this that does not involve looping of some form. You could do it in standard JS with something along these lines:

    var elems = document.getElementsByTagName("*"),
        myElems = [];
    for(var i = 0; i < elems.length; i++) {
       if(elems[i].offsetLeft > 10) myElems.push(elems[i]);
    }
    

    Or, if you’re using jQuery you can do it with a little less code (but it’s probably even slower!):

    var myElems = $("*").filter(function() {
        return $(this).offset().left > 10;
    });
    

    If you think about it, you want to select all of the elements in a document with a certain property value. That’s always going to involve a loop at some point, whether you write it yourself or not, as every element has to be checked.

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

Sidebar

Related Questions

I have this command that I run every 24 hours currently. find /var/www/html/audio -daystart
Child and descendant selectors have been leaking to every element on my html structure
I have an html link that has uses hover() (well, the hoverIntent plugin...but same
I'm looking for an HTML page that has an instance of every possible visual
I think beestings change the html every time. this means html is not able
How to encompass the first letter in every word with HTML tags? For example:
I'm working on drop down menus for this: http://www.heroicdreams.com/wordpress/elderFlashSite.html In every other browser it
Every example I've seen of CGI/Perl basically a bunch of print statements containing HTML,
I have a html_headers.inc.php script that I want to include in every script on
Possible Duplicates: How to determine which html page element has focus? How do 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.