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:
- <div id="container">
- <div id="textdiv">some text</div>
- <div id="imgdiv">
- <img src="images/image.jpg"/>
- </div>
- </div>