首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在tiptip中创建和提交表单

在tiptip中创建和提交表单
EN

Stack Overflow用户
提问于 2013-02-16 18:23:28
回答 1查看 76关注 0票数 0

我刚刚实现了tiptip,并且发现它非常好用。现在我想制作一个表单,并在tiptip工具提示中使用它,以便用户可以填写和提交它。

我已经创建了tiptip作为

代码语言:javascript
复制
  $('.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

代码语言:javascript
复制
<div class="div">Hover on Me</div>

tets.php

代码语言:javascript
复制
<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>&nbsp;</td>
      <td><input name="remember" type="checkbox" value="d"> Remember me</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="login" value="Login" /></td>
    </tr>
  </table>
</form>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 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上,它就会停留在那里。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14909237

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档