A
A
Artem Arsenowitch2015-06-09 19:35:44
backbone.js
Artem Arsenowitch, 2015-06-09 19:35:44

How to remove (not show) Backbone element?

Yes View

Marionette.LayoutView.extend({
ui: {
        "upload": "#upload",
        "edit": "#edit",
        "proceed": "#proceed",
        "actions": ".registration-actions"
      },
onSuccess: function() {
     // отобразить все ui-элементы   
},
onError: function() {
     //показать только "upload"
}
});

We need the view to show or hide elements depending on the "success" or "error" method.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2015-06-09
@Arsenowitch

onSuccess: function() {
     this.ui.upload.show();
     this.ui.edit.show();
     this.ui.proceed.show();
     this.ui.actions.show();
},
onError: function() {
     this.ui.upload.show();
     this.ui.edit.hide();
     this.ui.proceed.hide();
     this.ui.actions.hide();
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question