Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The script is probably executing but cannot find the div. To correct manipulate div put your jquery code to in a function and trigger that function using attached/compositionComplete callback for duranadal 2.0 or viewAttached callback for durandal 1.x</p> <p>1.x link - <a href="https://github.com/BlueSpire/Durandal/blob/master/docs/1.2/Composition.html.md#view-attached" rel="nofollow">https://github.com/BlueSpire/Durandal/blob/master/docs/1.2/Composition.html.md#view-attached</a></p> <p>2.0 link - <a href="http://durandaljs.com/documentation/Hooking-Lifecycle-Callbacks/" rel="nofollow">http://durandaljs.com/documentation/Hooking-Lifecycle-Callbacks/</a></p> <pre><code> // in your detail view model, if using durandal 1.x define(['services/logger'], function (logger) { var title = 'Details'; var vm = { activate: activate, title: title, viewAttached : function(view){ // view is the root element of your detail view and is passed in // by durandal $(view).append("Testing"); } }; return vm; //#region Internal Methods function activate() { logger.log(title + ' View Activated', null, title, true); return true; } //#endregion }); // in your detail view model, if using durandal 2.0, you have two options define(['services/logger'], function (logger) { var title = 'Details'; var vm = { activate: activate, title: title, attached : function(view, parent){ // view is the root element of your detail view // and is passed in by durandal $(view).append("Testing first method"); }, compositionComplete: function(view, parent){ // view is the root element of your detail view // and is passed in by durandal $(view).append("Testing second method"); } }; return vm; //#region Internal Methods function activate() { logger.log(title + ' View Activated', null, title, true); return true; } //#endregion }); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload