This code that I copy allows that when putting the mouse over the first image it shows the second one. However, I want to do something that I can't. I would like that when I put the mouse over the image it shows me a box as an iframe, because I have to show a result of that image that is in another tab and it is not an image. Does anyone know how?
I found it on this website: ( http://www.spiceupyourblog.com/2009/10/how-to-make-rollover-mouse-over-image.html#.V0_5qpOLSEK )
Alvaro Montoro's answer is good but the code does what I show in the image, let's see if someone knows how to solve it.
What I've understood, you need to open a modal window when you hover over a first image; and then display a second image that is copied into that modal from an attribute of the link...
I have made you an example in Jquery, I hope it can help you... I recommend you to use this library http://getbootstrap.com/ it is very useful, it will help you a lot in your developments.
Note: You need to use this library, http://jquery.com/download/
If I understand correctly, what you want is that in normal state it is an image, but when you hover the mouse over it it is a different content inside a
iframe
.To do this, what you could do is put the image as the background of the link, and when the mouse is over the link, show a
iframe
hidden one. Using a method like that you wouldn't even need JavaScript, it could be done with just HTML and CSS:It's not ideal though because the link would no longer redirect properly (plus it wouldn't be valid HTML because a
iframe
shouldn't go inside aa
).