Dojo : query()

 

<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN”
    “http://www.w3.org/TR/html4/strict.dtd”>
<html>
    <head>
        <title>Dojo</title>   
    <!– load the dojo toolkit base –>
    <script type=”text/javascript” src= “dojo/dojo/dojo.js”
        djConfig=”parseOnLoad:true, isDebug:true”></script>
    <script type=”text/javascript”>
   dojo.require(“dojo.NodeList-fx”);
  dojo.addOnLoad(function(){
    // our dom is ready, get the node:
    dojo.query(“#testHeading”)
         // add “testClass” to its class=”” attribute
        .addClass(“testClass”)
         // and fade it out after 500 ms
        .fadeOut({ delay:500 }).play();
});

    </script>
    <style type=”text/css”>
    /* CSS  */ 
    .testClass {
    background-color:red;
}
    </style>   
    </head>
    <body>
        <h1 id=”testHeading”>Dojo test</h1>       
        <div id=”Node”>
        <p></p>
    </div>
    </body>
</html>

Advertisements

2 Responses

  1. Definitely believe that which you said. Your favorite justification
    appeared to be on the web the simplest thing to be aware of.

    I say to you, I definitely get irked while people
    consider worries that they just do not know about.
    You managed to hit the nail upon the top and defined out
    the whole thing without having side effect ,
    people could take a signal. Will likely be back to get more.
    Thanks

  2. I believe this is among the most significant information for
    me. And i am glad studying your article. But should statement on some normal things, The site taste is great, the articles
    is actually excellent : D. Just right job, cheers

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: