Created
May 24, 2017 18:08
-
-
Save shenkev/dcf0acd49173dfcc15b659077bb5deb5 to your computer and use it in GitHub Desktop.
onHover response for each parameter
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Test</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
</head> | |
<body> | |
<h1 align="center">F=ma</h1> | |
<script type="text/javascript"> | |
$('h1').html(function(_, html) { | |
return '<span>' + html.split('').join('</span><span>') + '</span>'; | |
}); | |
$('span').hover( | |
function(e) { | |
alert("Hovered over " + $(e.target).text()); | |
}, function() {} | |
) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment