为什么 jquery 选择器不起作用?
看法
Views.Now = Backbone.View.extend({
template:"mytemplate",
initialize:function () {
var self = this;
this.$el.find(".content").hide(); // selector is not working
}
});
模板:
<div id="now">
<p class="loader">Waiting for connection</p>
<div class="content">
<button>hello world</button>
</div>