开发者

cluetip plug-in on jQuery loaded nods

开发者 https://www.devze.com 2023-04-08 17:12 出处:网络
This is the scenario: The user clicks on e.g. a butto开发者_如何转开发n, that loads (using jQuery) a node, e.g.

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

精彩评论

暂无评论...
验证码 换一张
取 消