Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/274.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP重复区域内的jQuery_Php_Jquery - Fatal编程技术网

PHP重复区域内的jQuery

PHP重复区域内的jQuery,php,jquery,Php,Jquery,我想在重复区域的一行中创建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;

我想在重复区域的一行中创建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">&nbsp;</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">&nbsp;</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>

/*触发按钮*/
#立即下载{
背景:透明url(/media/img/downloadnow.png)无重复滚动0;
显示:块;
高度:44px;
保证金:0自动;
边缘底部:30px;
溢出:隐藏;
文本缩进:-999em;
宽度:159px;
光标:指针;
}
/*鼠标悬停状态*/
#立即下载:悬停{
背景位置:0-44px;
}
/*点击状态*/
#立即下载:焦点{
背景位置:0-88px;
}
/*工具提示样式*/
.工具提示{
显示:无;
背景:url(/media/img/tooltip/black\u arrow\u big.png);
身高:163px;
填充:40px 30px 10px 30px;
宽度:310px;
字体大小:11px;
颜色:#fff;
}
/*a.工具提示内的标签元素*/
.工具提示.标签{
颜色:黄色;
宽度:35px;
}
.工具提示a{
颜色:#ad4;
字体大小:11px;
字体大小:粗体;
}
身份证件
电子邮件
用户名
电子确认
等待密码
密码
激活
$(“#立即下载”)。工具提示({effect:'slide'})。动态({bottom:{direction:{direction:'up',bounce:true});

如果您发布了一些代码来显示问题的原因,这可能会有所帮助,但有一种猜测是您可能试图添加javascript对象的多个副本(jQuery工具提示),但对每个实例使用相同的标识符。。。如果是的话。。将行号添加到工具提示id以使实例名称对该行唯一


调试控制台告诉您什么是错误的?还是萤火虫??也许你也可以发布这些错误消息。

如果没有相关代码,我们真的帮不了你。你能展示你到目前为止的代码吗?好的,给我一秒钟。好的,我编辑了帖子,代码在上面。你包括jquery并为循环的每次迭代初始化工具提示。没有错误消息,但工具提示仅在第一行起作用。我会试试你说的,我会回来的。。谢谢你看到代码了。。。我不知道jQuery。。但我敢打赌,现在下载是工具提示id。。。您不能有多个具有相同id的dom节点。如果您只需要一个工具提示(您的css似乎建议),那么您需要在循环外实例化它,然后在每一行上触发它……我将其更改为:
$(“#”)。工具提示({effect:'slide'})。动态({bottom:{direction:'up',bounce:true});
之后是:
$(“#立即下载”)。工具提示({effect:'slide'})。动态({bottom:{direction:{direction:'up',bounce:true})但无positif结果…:/