Try our conversational search powered by Generative AI!

Hooking up to events with Dojo


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?

Feb 17, 2015 13:38

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) {
Feb 18, 2015 12:20

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.

], function (
) {
    return declare("epilabs.imagepreview.init", [_WidgetBase, _ContentMixin], {
        //templateString: '',

        postCreate: function () {
            // Here?
            query(".dgrid-row").forEach(function (node) {

Feb 18, 2015 15:21
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.