Backbone + jQuery UI

Shows a Backbone.View rendering a jQuery UI Tooltip

HTML

<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script>
<script src="http://documentcloud.github.com/backbone/backbone-min.js"></script>
<a class="test" title="" href="#">
    <img src="http://placehold.it/100x100" />
</a>

<a class="test" title="" href="#">
    <img src="http://placehold.it/100x100" />
</a>

<script type="text/tpl" id="a-tpl">
    <a class="test" title="" href="#">
        <img src="http://placehold.it/100x100" />
    </a>
</script>

JavaScript

$(".test").tooltip({
    content: "<h1>Dude!</h1>"
});

var View = Backbone.View.extend({
    template: _.template($('#a-tpl').html()),
    initialize: function(options) {
    	this.$el.find('.test').tooltip({
            content: "<h1>Dude!</h1>"
        })
    },
    render: function () {
        this.$el.append(this.template());  
        
        return this; 
    }
});

var view = new View({});
$('body').append(view.render().el);