I am not using css sprites for now.
I understand it is the optimum solution, but I am not able to rush it out in time.
I need a way to preload all the images for hover and active selectors.
I found a jQuery solution here
But I was wondering if there is a way for me to dynamically get the jQuery to read all the active and hover selectors in my css files?
my css filepath is /theme/V1/css/content.css
E.g. of my css file is:
.button_48x49_img {
width: 48px;
height: 49px;
}
.button_join_login_48x49_img {
background-image: url('a.png');
}
.button_join_login_48x49_img:hover {
background-image: url('b.png');
}
.button_join_login_48x49_img:active {
background-image: url('c.png');
}
Is there a way to somehow preload only b.png
and c.png
without me explicitly telling the preload javascript code?