javascript - Remove elements by class name with dojo -


how can remove elements found class name. want using dojo framework.

try below code.

<div id="list">     <div class="odd">one</div>     <div class="even">two</div>     <div class="odd">three</div>     <div class="even">four</div>     <div class="odd">five</div>     <div class="even">six</div> </div>    dojo.query(".odd").foreach(function(node, index, nodelist){     // each node in array returned dojo.query,     // execute following code     dojo.remove(node); }); 

referred below links :

https://dojotoolkit.org/reference-guide/1.7/dojo/destroy.html

http://dojotoolkit.org/documentation/tutorials/1.6/using_query/

thanks,

siva


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -