Preloading images for element states
问题 i've got some jquery script that changes element image on mouseover and the problem is it doesn't preload images.. I know the code is crappy a little (ok, ok really crappy), but i have to work with it, so.. <script type="text/javascript"> $(document).ready(function() { $('#searchbox_submit') .mouseover(function() { var src = $('.searchbox_submit').css("background-image",'url("/wp-content/themes/Locator/images/search_over.png")'); $('.searchbox_submit').attr("src", src); }) .mouseout(function(