Skip to content

Instantly share code, notes, and snippets.

@kjohnson
Last active March 25, 2017 01:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjohnson/0e13fb89d4befc34ea61a4e30212f8e3 to your computer and use it in GitHub Desktop.
Save kjohnson/0e13fb89d4befc34ea61a4e30212f8e3 to your computer and use it in GitHub Desktop.
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