2

我有一个带有 jQ​​uery 插件工具提示的 html 表单

<div href="#" class="tooltip" title="<img src='<?php echo "admin/".$item['img'] ?>'  width='70' height='70' /><a  style='float:left;margin:19px auto;'  class='button topmenu'>ارسال پیام</a>"><img src="<?php echo "admin/".$item['img'] ?>" alt="user" width="70" height="70"  /></div>

在标题的这段代码中,我有一个链接

<a></a> 

我希望在单击此链接时显示一个弹出窗口,但我无法使用此代码执行此操作

$(".tooltip title").click(function()
{
$("#login-box").fadeIn(300);
return false;
});

如何在标题中调用此链接?当鼠标进入 1 号 2 时显示我想要的当我单击 2 号中的链接时,我的表单出现了 ..

在此处输入图像描述

4

2 回答 2

1

请尝试以下方法:

$(".topmenu").click(function() {
    $("#login-box").fadeIn(300);
    return false;
});
于 2013-09-23T18:56:52.327 回答
0

You should be careful to surround the title HTML attribute with double quotes and use single quotes for the php code. For example:

"<img src="<?php echo 'admin/'.$item['img'] ?>"

instead of:

"<img src='<?php echo "admin/".$item['img'] ?>'

于 2013-09-23T18:45:44.527 回答