I would like to have my background images ready before the HTML loads. But, what is happening is some of my HTML elements like input elements are being loaded before the image is loaded in the background.
I have looked at lot of questions where they show how to preload the image. But, that some how doesn't solve my issue.
You have to delay the loading of the html part. Use any javascript image preloading technique, like this one:
...and then, use $.load(...) to load any further html into a div that's initially empty.