![]() |
Can I use jQuery to replace an image
Hello,
As the title says I am trying to replace an image on the page with another image. It appears to be working but I believe that the old image is still there. Is there a better way to do this? Should I remove the old image before I add the new one? Code:
$(".bannerImage").css('background-image','url("course_assets/banner_grey.png")');Code:
.bannerImage{ |
If that's the only script on your page then a better way would be to forget about jQuery and use a single JavaScript statement in place of the entire library.
|
| All times are GMT +1. The time now is 01:34 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.