Wait for everything to load, except for ONE object? (via window.load() and jQuery)

133 views Asked by At

I have a simple lazy-load, that looks like this (objects have opacity 0 via CSS):

if($('div#main').length) {
    $('div#main').find('.header').fadeTo(400, 1)
    .siblings('.content').delay(200).fadeTo(400, 1)
    .siblings('.page-title-container').delay(300).fadeTo(400, 1)
    .siblings('.footer').delay(400).fadeTo(400, 1);
}

Problem is, on pages where a Vimeo player has been embedded, the site stays blank for 2-3 seconds, until the Vimeo player loads and my lazy-load kicks in.

Is there any way I can wait for everything to load, EXCEPT the Vimeo player?

If I missed anything please do let me know!
Thank you!

1

There are 1 answers

2
Jari Thorup Palo On

Not really sure what you are after, but this might help: You can try out the :not()-selector, or filter out the vimeoplayer via .not()

:not()-selector: http://api.jquery.com/not-selector/

.not(): http://api.jquery.com/not/

/J.