简体   繁体   中英

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. 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>

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:

<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.

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();
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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