waitForImages for background-image












1















This is the part of the image I found with browsers inspector and I want to get recognized by waitforImages:



<div class="jtpl-background-area jqbga-container jqbga-web--image" background-area="" style="background-image: url('https://image.jimcdn.com/app/cms/image/transf/dimension=767x/path/s4354a59fbfee63e4/backgroundarea/ibb91266a7f033fa3/version/1529172695/image.jpg');background-position: 54.0833% 41.0025%;"></div>


Already tried it with $('.jtpl-background-area'), $('.jqbga-container') or $('.jtpl-background-area, .jqbga-container, .jqbga-web--image') but with the same result, it does not 'fire'. I think it simply does not find the picture on that url...(or I do something wrong as I am new to this stuff, maybe a syntax error)?



What do I have to do now, to get it recognizing that the image is that url/background-image? Any idea what I do wrong?



$('.jtpl-background-area').waitForImages(true).done(function() {
$('.jtpl-background-area').css('-webkit-animation', 'fadein 4s');
});


or



$(".jtpl-background-area jqbga-container jqbga-web-image").waitForImages(true).done(function() {
$('.jtpl-background-area').velocity({ opacity: 1 },{ duration: 4000});
});


Do not work. The page is loading - but without background-image at all.
A



//        $(window).on('load', function() {
// $(".jtpl-background-area").velocity({ opacity: 1 },{ duration: 3000});
//});


works - but bakgrounds popping up too late.










share|improve this question

























  • Still no solution. It drives me crazy...where is my mistake, how do I get a function triggered AFTER my background is loaded?! Nothing works. I already invested weeks, uncountable amount of hours and 'solutions'....I do not find out wtf is going on with the DIV above, need help...

    – MichaelS82
    Nov 24 '18 at 18:20


















1















This is the part of the image I found with browsers inspector and I want to get recognized by waitforImages:



<div class="jtpl-background-area jqbga-container jqbga-web--image" background-area="" style="background-image: url('https://image.jimcdn.com/app/cms/image/transf/dimension=767x/path/s4354a59fbfee63e4/backgroundarea/ibb91266a7f033fa3/version/1529172695/image.jpg');background-position: 54.0833% 41.0025%;"></div>


Already tried it with $('.jtpl-background-area'), $('.jqbga-container') or $('.jtpl-background-area, .jqbga-container, .jqbga-web--image') but with the same result, it does not 'fire'. I think it simply does not find the picture on that url...(or I do something wrong as I am new to this stuff, maybe a syntax error)?



What do I have to do now, to get it recognizing that the image is that url/background-image? Any idea what I do wrong?



$('.jtpl-background-area').waitForImages(true).done(function() {
$('.jtpl-background-area').css('-webkit-animation', 'fadein 4s');
});


or



$(".jtpl-background-area jqbga-container jqbga-web-image").waitForImages(true).done(function() {
$('.jtpl-background-area').velocity({ opacity: 1 },{ duration: 4000});
});


Do not work. The page is loading - but without background-image at all.
A



//        $(window).on('load', function() {
// $(".jtpl-background-area").velocity({ opacity: 1 },{ duration: 3000});
//});


works - but bakgrounds popping up too late.










share|improve this question

























  • Still no solution. It drives me crazy...where is my mistake, how do I get a function triggered AFTER my background is loaded?! Nothing works. I already invested weeks, uncountable amount of hours and 'solutions'....I do not find out wtf is going on with the DIV above, need help...

    – MichaelS82
    Nov 24 '18 at 18:20
















1












1








1








This is the part of the image I found with browsers inspector and I want to get recognized by waitforImages:



<div class="jtpl-background-area jqbga-container jqbga-web--image" background-area="" style="background-image: url('https://image.jimcdn.com/app/cms/image/transf/dimension=767x/path/s4354a59fbfee63e4/backgroundarea/ibb91266a7f033fa3/version/1529172695/image.jpg');background-position: 54.0833% 41.0025%;"></div>


Already tried it with $('.jtpl-background-area'), $('.jqbga-container') or $('.jtpl-background-area, .jqbga-container, .jqbga-web--image') but with the same result, it does not 'fire'. I think it simply does not find the picture on that url...(or I do something wrong as I am new to this stuff, maybe a syntax error)?



What do I have to do now, to get it recognizing that the image is that url/background-image? Any idea what I do wrong?



$('.jtpl-background-area').waitForImages(true).done(function() {
$('.jtpl-background-area').css('-webkit-animation', 'fadein 4s');
});


or



$(".jtpl-background-area jqbga-container jqbga-web-image").waitForImages(true).done(function() {
$('.jtpl-background-area').velocity({ opacity: 1 },{ duration: 4000});
});


Do not work. The page is loading - but without background-image at all.
A



//        $(window).on('load', function() {
// $(".jtpl-background-area").velocity({ opacity: 1 },{ duration: 3000});
//});


works - but bakgrounds popping up too late.










share|improve this question
















This is the part of the image I found with browsers inspector and I want to get recognized by waitforImages:



<div class="jtpl-background-area jqbga-container jqbga-web--image" background-area="" style="background-image: url('https://image.jimcdn.com/app/cms/image/transf/dimension=767x/path/s4354a59fbfee63e4/backgroundarea/ibb91266a7f033fa3/version/1529172695/image.jpg');background-position: 54.0833% 41.0025%;"></div>


Already tried it with $('.jtpl-background-area'), $('.jqbga-container') or $('.jtpl-background-area, .jqbga-container, .jqbga-web--image') but with the same result, it does not 'fire'. I think it simply does not find the picture on that url...(or I do something wrong as I am new to this stuff, maybe a syntax error)?



What do I have to do now, to get it recognizing that the image is that url/background-image? Any idea what I do wrong?



$('.jtpl-background-area').waitForImages(true).done(function() {
$('.jtpl-background-area').css('-webkit-animation', 'fadein 4s');
});


or



$(".jtpl-background-area jqbga-container jqbga-web-image").waitForImages(true).done(function() {
$('.jtpl-background-area').velocity({ opacity: 1 },{ duration: 4000});
});


Do not work. The page is loading - but without background-image at all.
A



//        $(window).on('load', function() {
// $(".jtpl-background-area").velocity({ opacity: 1 },{ duration: 3000});
//});


works - but bakgrounds popping up too late.







jquery jquery-plugins waitforimages






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 25 '18 at 1:24







MichaelS82

















asked Feb 16 '18 at 0:19









MichaelS82MichaelS82

63




63













  • Still no solution. It drives me crazy...where is my mistake, how do I get a function triggered AFTER my background is loaded?! Nothing works. I already invested weeks, uncountable amount of hours and 'solutions'....I do not find out wtf is going on with the DIV above, need help...

    – MichaelS82
    Nov 24 '18 at 18:20





















  • Still no solution. It drives me crazy...where is my mistake, how do I get a function triggered AFTER my background is loaded?! Nothing works. I already invested weeks, uncountable amount of hours and 'solutions'....I do not find out wtf is going on with the DIV above, need help...

    – MichaelS82
    Nov 24 '18 at 18:20



















Still no solution. It drives me crazy...where is my mistake, how do I get a function triggered AFTER my background is loaded?! Nothing works. I already invested weeks, uncountable amount of hours and 'solutions'....I do not find out wtf is going on with the DIV above, need help...

– MichaelS82
Nov 24 '18 at 18:20







Still no solution. It drives me crazy...where is my mistake, how do I get a function triggered AFTER my background is loaded?! Nothing works. I already invested weeks, uncountable amount of hours and 'solutions'....I do not find out wtf is going on with the DIV above, need help...

– MichaelS82
Nov 24 '18 at 18:20














1 Answer
1






active

oldest

votes


















0














According to the documentation, you need to enable an option for the plugin to scan for images in CSS properties.



Your code should be...



$('.jqbga-web--image').waitForImages(true).done(function() {
$('.jtpl-main').css('visibility', 'visible');
});





share|improve this answer
























  • I still do not get it to work. Also if I exchange .jqbga-web--image with jtpl-background-area or jqbga-container. What do I do wrong?

    – MichaelS82
    Jun 4 '18 at 8:29











  • @MichaelS82 If you make a jsfiddle or similar we can take a look at exactly the problem

    – alex
    Jun 4 '18 at 8:41











  • I dont get this to work in a fiddle, sorry. I need someone who could explain me what exactly is going on in the DIVs.

    – MichaelS82
    Nov 24 '18 at 18:25













  • I still found no solution, I am using Jimdo and I do not know how to build a fiddle of this complex thing. Its impossible to me. I have a given div-class (starting-post). Now I have set .jtpl-background-area to opacity 0 and want to fade the bg-image in after the bg is 100% sure loaded. What has it to do with visibility? I do not get it why it does not work here...

    – MichaelS82
    Nov 25 '18 at 1:16













Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f48818369%2fwaitforimages-for-background-image%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














According to the documentation, you need to enable an option for the plugin to scan for images in CSS properties.



Your code should be...



$('.jqbga-web--image').waitForImages(true).done(function() {
$('.jtpl-main').css('visibility', 'visible');
});





share|improve this answer
























  • I still do not get it to work. Also if I exchange .jqbga-web--image with jtpl-background-area or jqbga-container. What do I do wrong?

    – MichaelS82
    Jun 4 '18 at 8:29











  • @MichaelS82 If you make a jsfiddle or similar we can take a look at exactly the problem

    – alex
    Jun 4 '18 at 8:41











  • I dont get this to work in a fiddle, sorry. I need someone who could explain me what exactly is going on in the DIVs.

    – MichaelS82
    Nov 24 '18 at 18:25













  • I still found no solution, I am using Jimdo and I do not know how to build a fiddle of this complex thing. Its impossible to me. I have a given div-class (starting-post). Now I have set .jtpl-background-area to opacity 0 and want to fade the bg-image in after the bg is 100% sure loaded. What has it to do with visibility? I do not get it why it does not work here...

    – MichaelS82
    Nov 25 '18 at 1:16


















0














According to the documentation, you need to enable an option for the plugin to scan for images in CSS properties.



Your code should be...



$('.jqbga-web--image').waitForImages(true).done(function() {
$('.jtpl-main').css('visibility', 'visible');
});





share|improve this answer
























  • I still do not get it to work. Also if I exchange .jqbga-web--image with jtpl-background-area or jqbga-container. What do I do wrong?

    – MichaelS82
    Jun 4 '18 at 8:29











  • @MichaelS82 If you make a jsfiddle or similar we can take a look at exactly the problem

    – alex
    Jun 4 '18 at 8:41











  • I dont get this to work in a fiddle, sorry. I need someone who could explain me what exactly is going on in the DIVs.

    – MichaelS82
    Nov 24 '18 at 18:25













  • I still found no solution, I am using Jimdo and I do not know how to build a fiddle of this complex thing. Its impossible to me. I have a given div-class (starting-post). Now I have set .jtpl-background-area to opacity 0 and want to fade the bg-image in after the bg is 100% sure loaded. What has it to do with visibility? I do not get it why it does not work here...

    – MichaelS82
    Nov 25 '18 at 1:16
















0












0








0







According to the documentation, you need to enable an option for the plugin to scan for images in CSS properties.



Your code should be...



$('.jqbga-web--image').waitForImages(true).done(function() {
$('.jtpl-main').css('visibility', 'visible');
});





share|improve this answer













According to the documentation, you need to enable an option for the plugin to scan for images in CSS properties.



Your code should be...



$('.jqbga-web--image').waitForImages(true).done(function() {
$('.jtpl-main').css('visibility', 'visible');
});






share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 16 '18 at 9:26









alexalex

342k170769914




342k170769914













  • I still do not get it to work. Also if I exchange .jqbga-web--image with jtpl-background-area or jqbga-container. What do I do wrong?

    – MichaelS82
    Jun 4 '18 at 8:29











  • @MichaelS82 If you make a jsfiddle or similar we can take a look at exactly the problem

    – alex
    Jun 4 '18 at 8:41











  • I dont get this to work in a fiddle, sorry. I need someone who could explain me what exactly is going on in the DIVs.

    – MichaelS82
    Nov 24 '18 at 18:25













  • I still found no solution, I am using Jimdo and I do not know how to build a fiddle of this complex thing. Its impossible to me. I have a given div-class (starting-post). Now I have set .jtpl-background-area to opacity 0 and want to fade the bg-image in after the bg is 100% sure loaded. What has it to do with visibility? I do not get it why it does not work here...

    – MichaelS82
    Nov 25 '18 at 1:16





















  • I still do not get it to work. Also if I exchange .jqbga-web--image with jtpl-background-area or jqbga-container. What do I do wrong?

    – MichaelS82
    Jun 4 '18 at 8:29











  • @MichaelS82 If you make a jsfiddle or similar we can take a look at exactly the problem

    – alex
    Jun 4 '18 at 8:41











  • I dont get this to work in a fiddle, sorry. I need someone who could explain me what exactly is going on in the DIVs.

    – MichaelS82
    Nov 24 '18 at 18:25













  • I still found no solution, I am using Jimdo and I do not know how to build a fiddle of this complex thing. Its impossible to me. I have a given div-class (starting-post). Now I have set .jtpl-background-area to opacity 0 and want to fade the bg-image in after the bg is 100% sure loaded. What has it to do with visibility? I do not get it why it does not work here...

    – MichaelS82
    Nov 25 '18 at 1:16



















I still do not get it to work. Also if I exchange .jqbga-web--image with jtpl-background-area or jqbga-container. What do I do wrong?

– MichaelS82
Jun 4 '18 at 8:29





I still do not get it to work. Also if I exchange .jqbga-web--image with jtpl-background-area or jqbga-container. What do I do wrong?

– MichaelS82
Jun 4 '18 at 8:29













@MichaelS82 If you make a jsfiddle or similar we can take a look at exactly the problem

– alex
Jun 4 '18 at 8:41





@MichaelS82 If you make a jsfiddle or similar we can take a look at exactly the problem

– alex
Jun 4 '18 at 8:41













I dont get this to work in a fiddle, sorry. I need someone who could explain me what exactly is going on in the DIVs.

– MichaelS82
Nov 24 '18 at 18:25







I dont get this to work in a fiddle, sorry. I need someone who could explain me what exactly is going on in the DIVs.

– MichaelS82
Nov 24 '18 at 18:25















I still found no solution, I am using Jimdo and I do not know how to build a fiddle of this complex thing. Its impossible to me. I have a given div-class (starting-post). Now I have set .jtpl-background-area to opacity 0 and want to fade the bg-image in after the bg is 100% sure loaded. What has it to do with visibility? I do not get it why it does not work here...

– MichaelS82
Nov 25 '18 at 1:16







I still found no solution, I am using Jimdo and I do not know how to build a fiddle of this complex thing. Its impossible to me. I have a given div-class (starting-post). Now I have set .jtpl-background-area to opacity 0 and want to fade the bg-image in after the bg is 100% sure loaded. What has it to do with visibility? I do not get it why it does not work here...

– MichaelS82
Nov 25 '18 at 1:16






















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f48818369%2fwaitforimages-for-background-image%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

Refactoring coordinates for Minecraft Pi buildings written in Python