Search code examples
jquerycluetip

cluetip plug-in on jQuery loaded nods


This is the scenario:

The user clicks on e.g. a button, that loads (using jQuery) a node, e.g.

'<span id="selected" title="|click to reselect">selected: #' + id + '</span>'

Then goes jQuery (for cluetip) code:

$('#selected').cluetip({splitTitle: '|', showTitle: false});

Cluetip applied to that jQuery loaded node does not fire.

Anyone knows the solution?

Much appreciated.


Solution

  • Here's an example:

    $('#button').click(function () {
        $('#container').append('<span id="selected">...</span>');
        $('#selected').cluetip();
    });