mootool set value to div
I am using Mootools and I have the following div:
<div class="total-title">12</div>
I wa开发者_开发百科nt to change this div text but my code is not working:
$('total-title').set('text', 'text goes here');
Thanks
You have given your div a class, no an ID, so the following:
$$('.total-title').set('text', 'text goes here');
I suspect that for a element you want to set the "html" property, not the "text" property.
精彩评论