cluetip plug-in on jQuery loaded nods
This is the scenario:
The user clicks on e.g. a butto开发者_如何转开发n, 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.
Here's an example:
$('#button').click(function () {
$('#container').append('<span id="selected">...</span>');
$('#selected').cluetip();
});
Try putting your reference to ClueTip at the bottom of your page, not in the header.
<script type="text/javascript" src="cluetip url here"></script>
精彩评论