Note that there are some explanatory texts on larger screens.

plurals
  1. POLoading a long page with multiple backgrounds based on vertical scroll value in jQuery?
    primarykey
    data
    text
    <p>The design I've been given to work with is 960px wide by around 7000px tall, cut into five vertically-stacked segments at arbitrary points. There's a fixed-placed sidebar that scrolls to each segment, depending on which navigation link is clicked. Atop this are a bunch of sliders, transparent PNGs, headlines and paragraphs, predominantly positioned in a relative fashion.</p> <p>I need to ultimately do two things:</p> <ol> <li><p>Hide the corresponding quick-nav links in the sidebar until its related segment's background image has loaded</p></li> <li><p>Load (and ideally fade in) the transparent PNGs in each section as needed -- the user scrolls between two vertical scroll values and stops for a second, causing that section's transparent PNGs to then load and fade in.</p></li> </ol> <p>I'm currently using <a href="http://scripterlative.com/files/softscroll.htm" rel="nofollow">softscroll.js</a> to achieve a smooth scrolling effect for when the sidebar links are clicked (thus scrolling to the related anchors). Thus, lazy loading techniques that begin to load images as you scroll by won't work -- if I click the last link in the sidebar nav and it scrolls me to the bottom, I don't want every image between the bottom segment and the top loading as a result.</p> <p>While I'll need to figure out point 1 sooner rather than later, I'm more interested in the second question. </p> <p><strong>How would one use jQuery to load images inside a certain element <em>if and only if</em> the user has paused between two specific vertical scroll values?</strong></p> <p>Thank you!</p> <p>(BTW, please <strong>don't</strong> respond with <a href="http://www.appelsiini.net/projects/lazyload" rel="nofollow">appelsiini's lazyload jQuery plugin</a>. It's unsupported by the developer and doesn't appear to work in modern browsers. Thanks!)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload