WordPress.org

Ready to get started?Download WordPress

Forums

Collapse-O-Matic
[resolved] Anchor Position Offset By Unloaded Image's Height (6 posts)

  1. UaMV
    Member
    Posted 1 year ago #

    Hello! Thank you for this plugin! i have been working to develop a new site for our organization that depends heavily upon your plugin. It is so customizable and functions super well.

    One small issue has arisen as i took the page live for testing ...

    i am using the findme="auto" attribute of the shortcode for every child page that is displayed, and notice that, due to image loading time (if images are not previously cached in a user's browser), the anchor position (i.e. it's name attribute) is often offset by the image height of any unloaded images that exist before the anchor. This makes the vertical position called by that anchor less than it should be. Thus, when the trigger executes 'findme', the trigger element is not always focused to the top of the page.

    I currently know next to nothing about jquery, but is there a way to assign, or re-assign, the name attribute to the anchor tags after all images on the page have loaded? You can find a live test page at vandercar.net/wmpl. The site will eventually go live at wmpl.org. The 'Where We Work' page has a number of images and has been giving me the most issues.

    Also, if this a fix that could be implemented in future versions (i.e. doesn't negatively impact optimal functionality), i would greatly appreciate that, so i don't lose any fixes in future upgrades. Thank you!

    http://wordpress.org/extend/plugins/jquery-collapse-o-matic/

  2. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Hmmm... interesting. We'll look into triggering the findme="auto" values once all the images have loaded in the next release.

    In the mean time, you could give the findme a fixed value, like findme="720"...then the page would scroll to that position regardless if the image has loaded or not.

  3. UaMV
    Member
    Posted 1 year ago #

    Thanks, Biden. i'll hold off on defining them each individually, as they would need to be updated any time a subpage might be added, or edited. The header is still usually visible in the browser, just not set to the top. i'll look forward to the possible inclusion of this fix in the next release. Again, thanks!

  4. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    UaMV: Please upgrade to version 1.4.11c direct from the Plugin Oven: http://plugins.twinpictures.de/plugins/collapse-o-matic/

    It should wait until all elements (including images) have loaded before calculating the auto findme offset.

    Please let us know if it works out for you.

  5. UaMV
    Member
    Posted 1 year ago #

    Nice! Working flawlessly! Many thanks!

  6. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    schweet!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic