April 2, 2012

Dojo equivalent to jQuery.text function?

Question by Derek

What is the Dojo equivalent to $("...").text("asdf") and $("...").text()?

Also is there a wiki or site that provides dojo equivalents of jQuery functions?

Answer by Starx

Use can do this as

dojo.query('#yourdiv')[0].lastChild.textContent = 'text';
var text = dojo.query('#yourdiv')[0].lastChild.textContent

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!