How to use cluetip with backbonejs

64 views Asked by At

Is there any example code showing use of cluetip with backboneJS? on click of button i want to show a cluetip popup. But I found no example for this.

1

There are 1 answers

9
Ravi Hamsa On BEST ANSWER

Backbone shouldn't change how you use cluetip here is the 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();