Marionette.Js の問題でクリア div を追加できない
私が行うすべてのことは、アイテムの前にdiv clearを追加することでした
お気に入り
リストクリアアイテムアイテムアイテム
ここに私のコードがあります
var MyItemView = Backbone.Marionette.ItemView.extend({
template: tplI ,
className: 'item',
tagName : 'article',
});
var myCompositeView = Backbone.Marionette.CompositeView.extend({
itemView: MyItemView ,
itemViewContainer: "#list",
template: tplC ,
className : 'wikis' ,
initialize: function () {
this.collection = new Collection () ;
this.model = new CollectionModel() ;
this.listenTo(this.collection, "reset", this.set);
},
set: function ( collect ) {
this.model.set( collect.wiki ) ;
this.render() ;
} ,
onRender : function( evt ){
if ( $.trim( this.$('#list').html() ) != "" ) {
this.$('#list').append( '<div class="clear"></div>' ) ;
}
},
onClose :function() { $('#list').
this.$el.height( 0 ) ;
}
});
ご協力いただきありがとうございます