move text from one div to another with javascript or mootools
Posted
by Ke
on Stack Overflow
See other posts from Stack Overflow
or by Ke
Published on 2010-03-17T09:18:58Z
Indexed on
2010/03/17
9:21 UTC
Read the original article
Hit count: 150
Hi,
I have two divs. I would like to move/populate the text from div id one to div id two using an onclick event. I am wondering how to do this? and also whether mootools can be used to accomplish the task or whether simple javascript is only necessary?
<div id='one'>
<ul>
<input type="checkbox" onclick = "my_function()"/>
<li>some text 1</li>
<input type="checkbox" onclick = "my_function()"/>
<li>some text 2</li>
</ul>
<div>
<div id='two'>
<div>
Cheers in advance for any helps. Bangin my head against a brick wall here, because my javascript skillz are limited!
Ke
© Stack Overflow or respective owner