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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:44:33+00:00 2026-05-30T01:44:33+00:00

As you can see the image below, there is A, B, C, D and

  • 0

As you can see the image below, there is “A”, “B”, “C”, “D” and “E” on the website, and the user may only can see the A, B, and a little parts of D in their browser. They need to require to scroll down the browser or some users may have a bigger screen, or a longer window on their browser that allow they can even see the element C.

Ok, my question is, is this possible to let me know what the user seeing on their browser using javascript? In this element, is “A”, “B” and “D”.

enter image description here

  • 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-30T01:44:34+00:00Added an answer on May 30, 2026 at 1:44 am

    Try it 🙂 http://jsfiddle.net/Aj2fU/5/

    $('input').click(function(){
       // check for visible divs with class 'check'   
        $('.check').each(function(){
            var pos = $(this).offset(),
                wX = $(window).scrollLeft(), wY = $(window).scrollTop(),
                wH = $(window).height(), wW = $(window).width(),
                oH = $(this).outerHeight(), oW = $(this).outerWidth();
    
            // check the edges
            // left, top and right, bottom are in the viewport
            if (pos.left >= wX && pos.top >= wY && 
                oW + pos.left <= wX + wW && oH + pos.top <= wY + wH )
                alert('Div #' + $(this).attr('id') + ' is fully visible');
            else // partially visible   
            if (((pos.left <= wX && pos.left + oW > wX) ||
                 (pos.left >= wX && pos.left <= wX + wW)) &&
                ((pos.top <= wY && pos.top + oH > wY)   ||
                 (pos.top  >= wY && pos.top  <= wY + wH)))
                alert('Div #' + $(this).attr('id') + ' is partially visible');
            else // not visible 
                alert('Div #' + $(this).attr('id') + ' is not visible');
        });        
    });​
    

    Updated to work with very wide divs. Basically it checks whether the left, top and right, bottom edges of the divs are both in the visible part of the screen, partially or outside of the viewport.

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

Sidebar

Related Questions

I can't seem to figure this out but see the image below: There are
I'm trying to do like what you can see on the image below: I'm
There is a nice feature in the Open Project... dialog (see image below) in
I have a div that contains 3 fields You can see the image here
I have a Dell Inspiron E1505 and as you can see in this image
As you can see on http://jsbin.com/erivi/ I'm using Jquery to change some image (and
I'm plotting on top of an image in Matlab. Sometimes, I can't see what's
Basically just looking to see if you can capture an image from the webcam
I'm trying to show thumbnail images in Django admin, but I can only see
The Android TextView clips off my text subscripts (see image below) even when 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.