why does the following code not work?
http://jsbin.com/ayugiq/edit#javascript,html,live
Im trying to “extract” the plainest function for an elasticOut effect with dojo from this example:
http://dojotoolkit.org/reference-guide/dojo/fx/easing.html
(example is at the bottom)
Sorry im not lazy but this code does not work and I cant find any errors.
you need to change the event you are connecting to from this:
dojo.connect(dijit.byId("moveButton"), "onClick", moveIt);to
dojo.connect(dojo.byId("moveButton"), "onclick", moveIt);the ‘onClick’ event only applies to actual dijit widgets, whereas the ‘onclick’ event applies to native html elements such as
<button>. Also, dijit.byId() should only be used to retrieve actual widgets, wheras dojo.byId retrieves plain html DOM Nodes such as thebuttonyou are using.