I want a nice "on mouse over"-effect on a word. I want my system to show a 2*1 (inches) rectangle with some information in it. Please guide me to an url or show an example
Use some Javascript.
Jquery makes thoose things quite easy. Do you already have the information or is it something you want to pull from the server when the mouse is hovering?
with Jquery you could do something like this
<script type="javascript">
$(document).ready(
function(){
$("divToShow").hide();
$('#objectWithMouseOver').mouseover(onMouseOver());
});
function onMouseOver()
{
$('#divToShow').show();
}
</script>
<body>
<div id="divToShow">
whatever info you want to show....
</div>
<div id="objectWithMouseOver">
when you drag mouse over here the other will show
</div>
I would use addclass removeclass instead of show/hide to get better controll. Its not hard to extend it to call mvc controlls and pupulate data using ajax. add some parameters to the function and the use jquery.ajax functions.
Adding to that jQuery is now being supported in intellisense by Microsoft so it's worth using with ASP.NET MVC Framework.
use css
Have a hidden div and a :hover on the word you wish to attach the popup to
You will need to have a helper JS script to load this in IE6
<span class="WordHighlight">word
<div class="hiddenPopup">some words about the word</div></span>
CSS
.WordHighlight{text-decoration:dotted}
.WordHighlight .hiddenPopup{display:none;/* add popup style */}
.WordHighlight:hover .hiddenPopup{display:inline;}
.WordHighlightHover .hiddenPopup{display:inline;}
add the script in a
I will try to get back to finish this later