AI OnAI Off
I'm not really sure what you are trying to do so it is hard to give a good answer. I think perhaps the dojo/on module is what you are after; this is basically an event listener module that works with DOM nodes and classes implementing dojo/Evented. For example:
require(["dojo/on"], function(on) { on(document.body, "hover", function(e) { console.log(e); }); });
Getting to understand how Dojo works, but lost on how to iterate through the items in the media-folder? Im going to assume that the items hasn't even been created in the doom in postCreate.
define([ "dojo/dom", "dojo/query", "dojo/_base/declare", "dojo/on", "dijit/_WidgetBase", "epi/shell/_ContextMixin", "epi/shell/widget/_FocusableMixin", ], function ( dom, query, declare, on, _WidgetBase, _ContentMixin ) { return declare("epilabs.imagepreview.init", [_WidgetBase, _ContentMixin], { //templateString: '', postCreate: function () { // Here? query(".dgrid-row").forEach(function (node) { console.log(node); }); } }); });
I am trying to hook up an event for the media-folder using Dojo. The idea is to hook up to a hover event on images. Might be my lack of skills Dojo but i'm having trouble finding out on how to achieve this. Any that have tried something similar or can point me in the right direction?