是否有任何示例代码显示使用带有backboneJS的cluetip?点击按钮我想显示一个cluetip弹出窗口。但我没有找到这方面的例子。
答案 0 :(得分:1)
Backbone不应该改变你使用cluetip的方式example
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();