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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:51:45+00:00 2026-05-28T13:51:45+00:00

I have a DOM element that I am storing the offset position of. For

  • 0

I have a DOM element that I am storing the offset position of. For example:

$element.data('offset', $element.offset().top);

However, because the page uses Web fonts and has images that have no explicit width or height attributes in the HTML, the page length actually increases as these items finish loading.

Therefore, if this code is run before all resources have loaded completely, the offset will be different. For example, 500 if the Web fonts are still loading, and 1000 if everything has loaded.

I’ve tried using the jQuery load function. This improves the situation, storing the offset only once the page has completely loaded around 70% of the time. However, I need 100% accuracy.

How could this be solved?

  • 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-28T13:51:45+00:00Added an answer on May 28, 2026 at 1:51 pm

    Use the Google WebFont Loader, namely the active() callback. The loader supports font libraries other than Google, so you can load your own fonts:

    https://developers.google.com/webfonts/docs/webfont_loader

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

Sidebar

Related Questions

I have built a one page web application that manipulates a set of data:
I have a DOM element in memory that is yet to be injected in
I have a function that changes a dom element's text to a given value,
I have backbone view that binds an action to an element in the DOM.
I have the following function to remove a DOM element div, $('#emDiv').on(click, ':button[data-emp-del=true]', function
I have some Java (5.0) code that constructs a DOM from various (cached) data
I'm trying to select all dom elements that have id=mydiv but exclude the ones
How do I use jQuery to select DOM elements that do not have ID
I have a DOM element in my frame, and when I click on it,
Say I have the following DOM element in my piece of code: <div id=test>

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.