Answer the question
In order to leave comments, you need to log in
How to preload images via js, jquery, if they are set in pseudo-elements via content?
For preloading, I generally found this way:
function preloadImages()
{
for(var i = 0; i<arguments.length; i++)
$("<img />").attr("src", arguments[i]);
}
preloadImages("img/hoverimage1.jpg","img/hoverimage2.jpg");
a.active:before {
content: url(images/pasatizi.png);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question