Skip to content

Instantly share code, notes, and snippets.

@kjohnson

kjohnson/listToVisibleChange.js Secret

Last active Mar 25, 2017
Embed
What would you like to do?
var myConditionalLogicController = Marionette.Object.extend({
initialize: function () {
this.listenTo( Backbone.Radio.channel('fields'), 'change:model', this.fieldModelChange );
},
fieldModelChange: function( fieldModel ) {
if ( fieldModel.changed.visible !== true) return;
// code to be run when a conditional is field is shown
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment