Pritesh Mahajan
Pritesh Mahajan

Reputation: 5174

At hover I want to refresh my page

Here is my code

<input type="button"  class="refresh" value="refresh">

<style>

.refresh {
    -moz-border-radius: 5px 5px 5px 5px;
    background: none repeat scroll 0 0 green;
    border: medium none navy;
    padding: 5px 15px;
    cursor:pointer;  } .refresh:hover{background: none repeat scroll 0 0 red;}   </style>

I want to refresh my page on hover through CSS. Is this possible?

Upvotes: 1

Views: 2570

Answers (3)

Bassem Reda Zohdy
Bassem Reda Zohdy

Reputation: 12942

just use onmouseover="function(this)" on your link like in below link:

http://www.w3schools.com/jsref/event_onmouseover.asp

Upvotes: 0

Mike
Mike

Reputation: 1544

Seeing as CSS is for styling, I'm going to say no..... This would most likely be done with Javascript. For example:

onmouseover="window.location.reload()"

Upvotes: 3

Murali Murugesan
Murali Murugesan

Reputation: 22619

No. You need to write a Javascript code

below is jQuery (javascript library) code

$('.refresh').hover(function(){

window.location.reload();

});

Upvotes: 2

Related Questions