Hide Image but let it download

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ritesh272004
    New Member
    • Oct 2011
    • 14

    #1

    Hide Image but let it download

    Hi,

    I am developing a webpage. I want to understand as how do i download image but do not display on webpage.

    E.g. I have given onmouseover effect to the buttons. In this case image does not get downloaded unless someone has moved the mouse over the image. In such scenario it takes a while to show the effect of the push button effect.

    Regards,
    Ritesh
  • limweizhong
    New Member
    • Dec 2006
    • 62

    #2
    The idea is called "Preloading images in HTML/JavaScript". Search that in Google and you will get what you want.

    Other ways:
    1. Toggle the visibility of two entirely different image elements, instead of changing the src property.
    2. Use a background-image combining both images and use the CSS background-position property.

    Comment

    Working...