I just port a bunch of code from jQuery to DOJO (1.8). I stumbled on showing / hiding DOM elements (let it be layers or something else).
Let's say we have a layer that we want to show or hide, without animation. Imagine that a Button Button that changes on an event, I donβt necessarily want to constantly add graphic effects.
<div id="myLayer">hide me</div>
In jQuery, I would do:
$("#myLayer").show(); // to show $("#myLayer").hide(); // to hide
which I find very beautiful and slim. Now porting to DOJO, I found that I need to do the following:
require(["dojo/fx/Toggler"], function(Toggler) {
These are 8 lines of code and 2 lines of code. Am I missing something? Is there a faster way to make simple conjugation?
Thanks a lot Tobi
source share