hover div swap

hover div swap

Hi,

I am new to jQuery and need some help that might be very simple.

I have a container div that holds two inner divs - one that has text and another that has an image. The image div is hidden on start.

I want to write a function that will change the text div to the image div on mouse over and that will change back the image div to the text one on mouse out. I tried using the replace with function but couldn't make it work.

here is the html:
  1. <div id="container">
  2.       <div id="textdiv">some text</div>
  3.       <div id="imgdiv">
  4.             <img src="images/image.jpg"/>
  5.       </div>
  6. </div>