marionettejs's public fiddles
-
Marionette.js. Defining and Attaching Behaviors
No-Library (pure JS), HTML, CSS, JavaScript
-
v3xbvh6n
No-Library (pure JS), HTML, CSS, JavaScript
-
y0zktfyg
No-Library (pure JS), HTML, CSS, JavaScript
-
x020k0a5
No-Library (pure JS), HTML, CSS, JavaScript
-
Composite View: Grid View
A grid view build w/ Marionette
-
Marionette.js. Marionette functions. Marionette. getOption for Marionette classes
Retrieve an object's attribute either directly from the object, or from the object's this.options, with this.options taking precedence. All Marionette Classes, such as the Views, come with this method.
-
Marionette.js. Application. Start
When Application was initialized and start method was called a set of events will be called in a specific order.
-
Marionette.js. Application Lifecycle
When Application was initialized and start method was called a set of events will be called in a specific order.
-
1h0xs98a
No-Library (pure JS), HTML, CSS, JavaScript
-
f5ndtmbe
No-Library (pure JS), HTML, CSS, JavaScript
-
Marionette.js. Events. Triggering Events on Child Events
Marionette 3 adds a new feature that allows selected events to fire events directly, allowing them to be propagated up the view hierarchy more easily and explicitly. The values of the hash should be a string of the event to trigger on the parent.
-
Marionette.js. Events. Attaching Functions
The `childViewEvents` attribute can also attach functions directly to be event handlers
-
Marionette.js. Events. Explicit Event Listeners
To call specific functions on event triggers, use the `childViewEvents` attribute to map child events to methods on the parent view. This takes events fired on child views - _without the `childview:` prefix_ - and calls the method referenced or attached function.
-
Marionette.js. Events. Event Bubbling Using `CollectionView`
This works exactly the same way for the `CollectionView` and its `childView`
-
Marionette.js. Events. Event Bubbling
Events fired on a view bubble up to their direct parent views, calling any magic methods using the `childview:` prefix (more on that shortly) and any methods bound to the `childViewEvents` attribute. This works for built-in events, custom events fired with `triggerMethod` and bound events using `triggers`.
-
Marionette.js. Events. Child View Events
The View and CollectionView are able to monitor and act on events on any children they own. Any events fired on a view are automatically propagated to their direct parents as well.
-
Marionette.js. Events. View events and triggers
Views can automatically bind DOM events to methods and View events with `events` and `triggers` respectively
-
Marionette.js. Events. Magic Method Binding
The major difference between `Backbone.trigger` and `View.triggerMethod` is that `triggerMethod` can fire specially named events on the attached view. For instance, a view that has been rendered will fire `view.triggerMethod('render')` and call `onRender` - providing a handy way to add behavior to your views.
-
Marionette.js. Events. Listening to Events
Marionette's event triggers work just like regular Backbone events - you can use `view.on` and `view.listenTo` to act on events.
-
Marionette.js. Events. Listening to Events
Marionette's event triggers work just like regular Backbone events - you can use `view.on` and `view.listenTo` to act on events.