Closed ddevault closed 11 years ago
Hi there, I have some code using backgrid to make a pretty grid, and when a row is clicked, I give it the "selected" class:
Backbone.on("rowclicked", function (row) { $("tr.selected").removeClass("selected"); $(row.$el).addClass("selected"); });
However, when I run collection.fetch();, I lose the "selected" class. Is there a good way to keep this in place?
collection.fetch();
http://backgridjs.com/#api-row
http://backbonejs.org/#View-delegateEvents
Hi, do you still have trouble with this issue?
No.
Hi there, I have some code using backgrid to make a pretty grid, and when a row is clicked, I give it the "selected" class:
However, when I run
collection.fetch();
, I lose the "selected" class. Is there a good way to keep this in place?