Created
March 26, 2012 18:18
-
-
Save vquaiato/2208405 to your computer and use it in GitHub Desktop.
hover images and p
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script> | |
$(document).ready(function(){ | |
$(".icone-chat").mouseover(function(){ | |
var data = $(this).attr("data"); | |
var p = "#" + data; | |
$(p).toggleClass('com-destaque'); | |
}).mouseout(function(){ | |
var data = $(this).attr("data"); | |
var p = "#" + data; | |
$(p).toggleClass('com-destaque'); | |
}); | |
}); | |
</script> | |
<style> | |
p{color:#333;} | |
.com-destaque{color:red;} | |
</style> | |
</head> | |
<body> | |
<span class="icone-chat" data="foo">passa o mouse aew</span> | |
<p id="foo">UMA DESCRICAO AEW</p> | |
<p>UMA DESCRICAO AEW</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment