Onclick animation

W

wes

Noob here...

How do I get started creating a animated onclick event? I wanted to
click on a link (href) and animates to fill the entire screen. I've
seen sample code that opens a new windows that animates from the top
corner outward, but that's not quite what I wanted.

Thanks in advance!
 
Z

Zif

wes said:
Noob here...

How do I get started creating a animated onclick event? I wanted to
click on a link (href) and animates to fill the entire screen. I've
seen sample code that opens a new windows that animates from the top
corner outward, but that's not quite what I wanted.

<script type="text/javascript">
function growMe()
{
var x = document.getElementById('xx');
var s = parseInt(x.style.fontSize, 10);
if ( s < 2000 ){
x.style.fontSize = (s*1.1)+'\u0025';
setTimeout('growMe()', 100);
return false;
}
x.innerHTML = '\u0042\u0069g \u004c\u0069nk\u0021';

}
</script>

<a href="#" id="xx" style="font-size: 100%;"
onclick="return growMe();">click me</a>


;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,161
Latest member
GertrudeMa
Top