Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9004445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:53:49+00:00 2026-06-16T00:53:49+00:00

In a custom dijit, I have a button with the data-dojo-attach-event hooked up to

  • 0

In a custom dijit, I have a button with the data-dojo-attach-event hooked up to a method called _goNext. I need to animate a node declared inside the Dijit controller javascript file, but it seems the scope of animateProperty is fudging things up a bit.

require([/* deps */], function(/*deps*/){
    return declare(null, {
    postCreate : function(){
        this._animNode = query('.someNode')[0];
    },
    // non-essentials omitted
    _goNext : function(){
        fx.animateProperty({
            node : this._animNode
            properties : { 
                left : { 
                    start : this._start,
                    end : this._end,
                    unit : 'px'
                } 
            },
            onEnd : function(){
                this.updateCurrentScreen();
            }
        }).play();
    }
} 
})

… is essentially what I’m working with. As this goes, it does nothing, as it’s scope is different than where my nodes and values are declared. If I put values in manually (hard-coded) and apply an id for the node parameter to grab onto, it works fine, but that’s silly and not what I’m after.

I’ve tried wrapping it in an anonymous wrapper passing this as the argument, but I’m getting TypeErrors with style and some other things.

Do I have to go as far as using hitch or some other variant of scope modifying method? Or is there an easier way to have this thing ready this correctly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:53:50+00:00Added an answer on June 16, 2026 at 12:53 am

    You definitely need to hitch your onEnd handler to the current value of this, otherwise you’ll have context issues when you try to call updateCurrentScreen

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a onsubmit dojo/method within a custom templated widget like so: try {
I have a custom widget, defined similar to this: dojo.declare('myWidget', [dijit._WidgetBase, dijit._Templated], { 'templateString':'<span>'
I have some problems getting the custom formated JSON data into a dijit.form.FilteringSelect. It
I have a dijit.Tree backed by a ForestStoreModel that uses a custom data store
I have developed a custom dijit Templated Widget. I have to do some DOM
I'm trying to follow the custom module tutorial at http://dojotoolkit.org/book/dojo-book-0-9/part-3-programmatic-dijit-and-dojo/modules-and-namespaces/creating-your-own-modul I've got a local
I have a custom dijit that loads fine when debugAtAllCosts = true , but
I am getting this error while loading a custom dijit. I have done this
I'm instantiating a dijit button inside a custom widget. That bit all works fine.
I have created a custom dijit widget which contains a grid and some buttons.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.