marionettejs's public fiddles
-
Marionette.js. View events
The view events attribute binds DOM events to functions or methods on the view. The simplest form is to reference a method on the view
-
Marionette.js. View. Defining Listeners
Listeners are defined as: eventname jqueryselector The eventname part refers to a jQuery DOM event e.g. click or change. The jqueryselector part is a jQuery selector string e.g. .myclass You can also pass just the eventname part causing the event handler to fire on the entire view. This is especially useful for buttons and click handlers:
-
Marionette.js. View. onEvent Listeners
Marionette creates onEvent listeners for all events fired using view.triggerMethod('event') - if there is an onEvent method, Marionette will call it for you
-
Marionette.js. View. Referencing UI in events
The UI attribute is especially useful when setting handlers in the events and triggers objects - simply use the @ui. prefix
-
Marionette.js. View. Accessing UI elements
To get the handles to your UI elements, use the getUI(ui) method
-
Marionette.js. View. Defining childViewEvents
The childViewEvents hash defines the events to listen to on a view's children mapped to the method to call. The method will receive a child object referencing the view that triggered the event.
-
Marionette.js. View. Accessing a child view
To access the child view of a View - use the getChildView(region) method. This will return the view instance that is current being displayed at that region, or null
-
Marionette.js. View. Showing a view inside a region
To show a view inside a region, simply call showChildView(region, view). This will handle rendering the view's HTML and attaching it to the DOM for you
-
Marionette.js. View. Laying out Views - Regions
The Marionette.View class lets us manage a hierarchy of views using regions. Regions are a hook point that lets us show views inside views, manage the show/hide lifecycles, and act on events inside the children.
-
Marionette.js. View. Managing an Existing Page
Marionette is able to manage pre-generated pages - either static or server-generated - and treat them as though they were generated from Marionette.
-
Marionette.js. View. Rendering a Template
The Marionette View implements a powerful render method which, given a template, will build your HTML from that template, mixing in model information and any extra template context.
-
6n02ex1m
No-Library (pure JS), HTML, CSS, JavaScript
-
ub510cbx
No-Library (pure JS), HTML, CSS, JavaScript
-
ekvb8wwa
No-Library (pure JS), HTML, CSS, JavaScript
-
nn1754fc
No-Library (pure JS), HTML, CSS, JavaScript
-
k93pejyb
No-Library (pure JS), HTML, CSS, JavaScript
-
zzjhm4p1
No-Library (pure JS), HTML, CSS, JavaScript
-
r5kmwwke
No-Library (pure JS), HTML, CSS, JavaScript
-
hmjgkg7w
No-Library (pure JS), HTML, CSS, JavaScript
-
yvsfm65c
No-Library (pure JS), HTML, CSS, JavaScript