I'm unable to get jquery tabs to render and interact correctly. Below are the relevant pieces of code; does any see what could be wrong?
As you'll see below, in my backbone view I add a (jquery tab) template to a div (the view's el
) and then render that div.
Template:
<div id="tab-set">
<ul>
<li><a href="#panel1">Details</a></li>
<li><a href="#panel2">Images</a></li>
<li><a href="#panel3">Appendix</a></li>
</ul>
<div id="panel1">...</div>
<div id="panel2">...</div>
<div id="panel3">...</div>
</div>
Backbone View
App.Views.IndexView = Backbone.View.extend({
tagName: 'div',
id: 'user-content',
template: JST['users/index'],
...
render: function(){
var view = this;
$(this.el).html(this.template({user: this.model}));
this.$('#date').datepicker();
this.$('#tab-set').tabs();
return this;
}
});