Question: I have to get bio from db using those:

```
<body>
 <div id="t1" class ="aDiv">
  <h2 id="tlh">Lois</h2>
   <div id="tabs1">
  <ul>
  <li><a href="#ltab1" onClick="whonext()">Lois</a></li>
  <li><a href="#ltab2" onClick="getBio('Lois','ltab2')">Bio</a></li>
  <li><a href="#ltab3" onClick="getFans()">Fans</a></li>
  <li><a href="#ltab4" onClick="">Fan of</a></li>
  </ul>

```

And PHP:

```
<?php
 include("dbconnect.php");
 $username=$_GET['username'];
 $query = "select bio from cast where username = '$username'";
 $link = mysql_query($query);
 if (!$link) {
   die($query);
 }
 $rows = array();
 while($r = mysql_fetch_assoc($link)) {
  $rows[] = $r;
 }
 $json=json_encode($rows);  
 echo $json;
 ?>

```

The AJAX request initiated by Tab 2 is processed at the server by a script called getbio.php.

I am totally new to webdesign and frankly I still don't quite understand functions.... it has been only 1,5 month since i started to learn. Could anyone help me?
Thank you,
Aga

Answer: 
what about

```
$('.menu').hover(function (e) {
    $(this).stop(true, true).animate({
        width: e.type == 'mouseenter' ?
            "350px" : '50px'
    }, 400);
});

```

Demo: [Fiddle](http://jsfiddle.net/arunpjohny/M7W6L)
You can write like below

```
$('.menu').hover(function(){
    $(this).animate( { width: "350px" }, 400 );
},function(){
    $(this).animate( { width: "50px" }, 400 );
});

```