Hello,
Please look into this code (or the attached file)
When clicking on the button toggles the table to hide and then to show, it leaves an extra width on the table. (See screenshot for details)
Is this a bug in jQuery? Can we overcome this?
[url]http://img442.imageshack.us/my.php?image=originalzh3.gif
[CODE]<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
<script language=”javascript” src=”jquery-1.2.6.js”></script>
<script>
$().ready(function(){
$(“#mybtn”).click(function(){
$(“#myid”).slideToggle();
});
});
</script>
</head>
<body>
<input type=”button” id=”mybtn” value=”Clicky” />
<table width=”50%” border=”0″ cellspacing=”0″ cellpadding=”0″ id=”myid” bgcolor=”#CCCCCC” align=”center”>
<tr>
<td align=”center”><strong>Name</strong></td>
<td align=”center”><strong>City</strong></td>
<td align=”center”><strong>Coutry </strong></td>
<td align=”center”><strong>Telephone</strong></td>
<td align=”center”><strong>Designtion</strong></td>
</tr>
<tr>
<td align=”center”>Paul</td>
<td align=”center”>New York</td>
<td align=”center”>US</td>
<td align=”center”>111222333444</td>
<td align=”center”>CEO</td>
</tr>
<tr>
<td align=”center”>Adam</td>
<td align=”center”>Chicago</td>
<td align=”center”>US</td>
<td align=”center”>11558899</td>
<td align=”center”>Programmer</td>
</tr>
</table>
</body>
</html>
Thanx
[upl-file uuid=1035fab5-67fc-4749-88e8-32d45fc7d818 size=31kB]jquery-Bug.zip