Solved

how can i make a popup image html on mouseover event

Posted on 2012-04-01
1
153 Views
Last Modified: 2012-04-11
hi...

someone know how can i make a popup image in html when happen moseover event at a text?

i have this code but it don't run

    <td height="83" rowspan="2">&nbsp;</td>
    <td width="87" height="87" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
    <a onmouseover="popup ('<img src= images/texto1.gif>','90px');"> hola</a>
 
     
    <font color="blue"><span title="Calidad en desarrollos humanos , tu mejor opcion">FILOSOFIA</span></font><br />
   
    <font color= "green"><span title="Confianza , Honestidad, Respeto, Eficiencia, Eficacia, Cooperacion">VALORES</span></font><br />
index.html
0
Comment
Question by:tenriquez199
1 Comment
 
LVL 16

Accepted Solution

by:
HagayMandel earned 500 total points
ID: 37795338
With the help of Jquery
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Image in a box</title>
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript" language="javascript">
 $(document).ready(function(){ 	
	xOffset = 5;
	yOffset = 20;
    $("#trial").hover(function (e) {		
		$("#message")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");	
			$("body").append("<div id='message'><img src='https://www.google.com/images/srpr/logo3w.png' width='200px' height='60px'></div>");					
    },
	function(){			
		$("#message").remove();
    });	
	$("#trial").mousemove(function (e) {					
			$('#message').css("top",(e.pageY - xOffset) + "px");
			$('#message').css("left",(e.pageX + yOffset) + "px");
			$('#message').fadeIn("fast");		    });
  	});  
	$("#trial").mouseleave(function () {		
		$("#message").hide();		
	});	
	
</script>
<style type="text/css">
<!--
#message {
	border:thin solid #CCCCCC;
	width: 200px;
	display:none;
	position:absolute;
}
-->
</style>
</head>

<body>
<a href="#" id="trial">Test text</a>
</body>
</html>

Open in new window

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now