Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

[Resolved] Mouseover to keep loading the image

SpaceshipSpaceship
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Watch

newsiness

VIP Member
Impact
49
Mouseover to keep loading the image

From the script below, it allows user to reload the image once when mouse over.
Code:
<img src="yourfile.jpg?o=1" onMouseOver="this.src+=1" alt="" />

Anyway to keep loading the same image url until onMouseOut?

Really appreciate your time & advice. Thanks!!!

Updates:
With thanks to DylanButler for this working code. :)

Code:
<script type="text/javascript">
var interval;
var amount = 1200;
function refreshImage() {
document.getElementById('refresher').src += 1;
}
function startInterval() {
interval = setInterval("refreshImage()", amount);
}
function cancelRefresh() {
clearInterval(interval);
}
</script>
<img id="refresher" src="84180.jpg?o=1" onmouseover="startInterval()" onmouseout="cancelRefresh()" alt="" />
 
Last edited:
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

A browser tab with a favicon next to the page title
Search members
You can now search for members by name, company, location and more. Open the search at the top of any page and choose Members. You will...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back