[jQuery] Problems with animate()
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6001.18226" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello mates!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'm having a few problems using the animate()
functions.</FONT></DIV>
<DIV><FONT face=Arial size=2>The following piece of code works perfectly
fine:</FONT></DIV>
<DIV><FONT face=Arial
size=2>$(document).ready(function(){<BR>$('#aba').animate({width: '300px'},
2000);<BR>$('#content').animate({width: '454px'}, 2000);</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR>$('#aba').animate({width: '30px'},
2000);<BR>$('#content').animate({width: '754px'}, 2000);<BR>});</DIV>
<DIV> </DIV>
<DIV>(I know it's lame, I was just testing, haha)</DIV>
<DIV> </DIV>
<DIV>But when I create a function such as this one:</DIV>
<DIV>function open() {<BR>$('#aba').animate({width: '300px'},
2000);<BR>$('#content').animate({width: '454px'}, 2000);<BR>}</DIV>
<DIV>and call it from a link the page reloads and nothing happens. I've tried
using return false or working with onmouseover on span tag, but everytime the
function is called I get this weird beaviour.</DIV>
<DIV>Does anybody know how to fix this? Thanks in advance!</DIV>
<DIV> </DIV>
<DIV>Cheers.</FONT></DIV></BODY></HTML>