我刚刚实现了tiptip,并且发现它非常好用。现在我想制作一个表单,并在tiptip工具提示中使用它,以便用户可以填写和提交它。
我已经创建了tiptip作为
$('.div').tipTip({
maxWidth: 1000,
defaultPosition: 'right',
content: function (e) {
$.ajax({
url: 'tets.php',
datatype: JSON,
success: function (response) {
$('#tiptip_content').html(response);
$('body').append(response).fadeIn('1000');// the var e is the callback function data (see above)
}
});
return 'Please wait...'; // We temporary show a Please wait text until the ajax success callback is called.
}
});我在工具提示中看到一个表单。现在,只要我把我的鼠标放进去,它就消失了(很明显,这是最后的工具提示)。有没有办法实现我想要实现的目标??
我的html
<div class="div">Hover on Me</div>tets.php
<form id = "testForm" method="post" action="newEmptyPHP.php">
<table width="400" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td width="150">Username</td>
<td width="250"><input name="username" type="text" class="textfield" /></td>
</tr>
<tr>
<td>Password</td>
<td><input name="password" type="password" class="textfield" /></td>
</tr>
<tr>
<td> </td>
<td><input name="remember" type="checkbox" value="d"> Remember me</td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="login" value="Login" /></td>
</tr>
</table>
</form>发布于 2013-02-16 18:34:38
http://code.drewwilson.com/entry/tiptip-jquery-plugin
"keepAlive: true of false (默认情况下为false)-当设置为true时,仅当您将鼠标悬停在实际的TipTip上并将鼠标悬停在其上时,TipTip才会淡出。“
尝试添加此属性并将其设置为true
更新:
示例如下:http://jsbin.com/imeqes/2/
当你将鼠标悬停在图像上,然后将鼠标悬停在tip上,它就会停留在那里。
https://stackoverflow.com/questions/14909237
复制相似问题