简体   繁体   English

如何在线索提示中显示动态内容?

[英]How to show dynamic content in cluetip?

I am using cluetip to show a tooltip when a user hovers over a link in my aspx page. 当用户将鼠标悬停在我的aspx页面中的链接上时,我正在使用cluetip显示工具提示。 I want this cluetip to show content from the database. 我希望此提示显示数据库中的内容。 I don't know how to do it. 我不知道该怎么做。

My code: 我的代码:

 $(document).ready(function () {$('a.title').cluetip
({   splitTitle: '|' });
    });

Aspx code: <a class="title" href="#" title="This is the title|Work Experience">Previous Exp</a> Aspx代码: <a class="title" href="#" title="This is the title|Work Experience">Previous Exp</a>

I would want to get the data from the database in the content of the cluetip.Any help would be much appreciated. 我想从数据库中获得线索提示内容中的数据。任何帮助将不胜感激。

There is a demo on the cluetip plugin website that suggests this syntax for ajax-based cluetips: cluetip插件网站上有一个演示,针对基于ajax的cluetips提出了以下语法建议:

<a class="basic" href="ajax.html" rel="ajax.html">

Yours would be: 您的将是:

<a class="title" rel="ajax.php" href="#" title="This is the title|Work Experience">Previous Exp</a>

where ajax.php is replaced with an asp page that returns what you want to display in the cluetip. 其中ajax.php被替换为一个asp页面,该页面返回您想要在提示中显示的内容。

Edit: You also have to remove the split title functionality. 编辑:您还必须删除拆分标题功能。

<a class="title" rel="ajax.php" href="#" title="Work Experience">Previous Exp</a>


$(document).ready(function () {
  $('a.title').cluetip();
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM