1

是否有任何示例代码显示在主干JS 中使用线索提示?单击按钮时,我想显示提示提示弹出窗口。但我没有找到这方面的例子。

4

1 回答 1

1

Backbone 不应该改变您使用线索提示的方式,这里是示例

HTML

<script type="text/template" id="template1">
    <p> <a id = "houdini"
    href = "houdini.html"
    title = "|Houdini was an escape artist.|He was also adept at prestidigitation." > Houdini </a></p>
</script>
<div id="container"></div>

JavaScript

var MyView = Backbone.View.extend({

    render: function () {
        this.$el.html($('#template1').html());
        this.$('#houdini').cluetip({
            splitTitle: '|', 
            showTitle: false 
        });
    }
})


var view = new MyView({
    el: '#container'
})

view.render();
于 2013-10-30T09:57:19.360 回答