我想在重复区域的一行内制作一个 jQuery 工具提示
我做到了,但是当重复区域发生时,jQuery 只在第一行工作!
有人可以帮忙吗?
<style type="text/css">
/* trigger button */
#download_now {
background:transparent url(/media/img/downloadnow.png) no-repeat scroll 0 0;
display:block;
height:44px;
margin: 0 auto;
margin-bottom:30px;
overflow:hidden;
text-indent:-999em;
width:159px;
cursor:pointer;
}
/* mouseover state */
#download_now:hover {
background-position:0 -44px;
}
/* clicked state */
#download_now:focus {
background-position:0 -88px;
}
/* tooltip styling */
.tooltip {
display:none;
background:url(/media/img/tooltip/black_arrow_big.png);
height:163px;
padding:40px 30px 10px 30px;
width:310px;
font-size:11px;
color:#fff;
}
/* a .label element inside tooltip */
.tooltip .label {
color:yellow;
width:35px;
}
.tooltip a {
color:#ad4;
font-size:11px;
font-weight:bold;
}
</style>
<style type="text/css">
<!--
body {
background-color: #884509;
}
-->
</style>
<center>
<table width="836" border="1">
<tr bgcolor="#999900">
<td width="16"> </td>
<td width="16">ID</td>
<td width="85">EMAIL</td>
<td width="85">USERNAME</td>
<td width="115">E-CONFIRMED</td>
<td width="200">WAITING PASSWORD</td>
<td width="163">PASSWORD</td>
<td width="104">ACTIVATE</td>
</tr>
<tr>
<?php do { ?>
<td height="26" bgcolor="#99FF00">
<? include("../infos.html"); ?>
<script src="http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"></script>
<script language="javascript">
$("#download_now").tooltip({ effect: 'slide'}).dynamic({ bottom: { direction: 'up', bounce: true } });
</script>
</td>
<td bgcolor="#99FF00"><?php echo $row_Recordset1['id']; ?></td>
<td bgcolor="#99FF00"><?php echo $row_Recordset1['email']; ?></td>
<td bgcolor="#99FF00"><?php echo $row_Recordset1['nick']; ?></td>
<td bgcolor="#99FF00"><?php echo $row_Recordset1['email_confirmation']; ?></td>
<td bgcolor="#99FF00"><?php echo $row_Recordset1['waiting_pass']; ?></td>
<td bgcolor="#99FF00"><?php echo $row_Recordset1['pass']; ?></td>
<td bgcolor="#99FF00"><form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
<table align="center">
<tr valign="baseline">
<td nowrap="nowrap" align="right">Pass:</td>
<td><input type="text" name="pass" value="<?php echo htmlentities($row_Recordset1['waiting_pass'], ENT_COMPAT, ''); ?>" size="32" /><br>
<input type="text" name="id" value="<?php echo htmlentities($row_Recordset1['id'], ENT_COMPAT, ''); ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><input type="submit" value="Update record" /></td>
</tr>
</table>
<input type="hidden" name="MM_update" value="form1" />
<input type="hidden" name="id" value="<?php echo $row_Recordset1['id']; ?>" />
</form>
</td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
</center>
这是上面的代码,请在本地主机上尝试以检查问题。注意:我删除了记录集,如果您希望我包含它,请告诉我。