-1

Im looing for a way to have a simple "on mouse over"-effect. (I want the page to show a dialogbox)

    4 Answers 4

    3

    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 control. Its not hard to extend it to call mvc controls and populate data using ajax. Add some parameters to the function and the use jquery.ajax functions.

      3

      I'd go for the jQuery Tooltip plug-in from Jörn Zaefferer

        1

        Adding to that jQuery is now being supported in intellisense by Microsoft so it's worth using with ASP.NET MVC Framework.

          1

          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

            Start asking to get answers

            Find the answer to your question by asking.

            Ask question

            Explore related questions

            See similar questions with these tags.