How to show dynamic content in cluetip?

1.6k views Asked by At

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.

1

There are 1 answers

4
Kevin B On BEST ANSWER

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