tags:

views:

65

answers:

3

All,

In the following code

<html>
<head>
 <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
 <script type="text/javascript" src="http://jqueryui.com/latest/jquery1.3.2.js"&gt;       
</script>

<script src="http://jqueryui.com/latest/ui/effects.core.js"&gt;&lt;/script&gt;
<script src="http://jqueryui.com/latest/ui/effects.slide.js"&gt;&lt;/script&gt;
<style type="text/css">
 #show { margin: 0px; width: 100px; height: 80px; background: green; border: 1px solid black; position: relative; }
</style>
<script>
$(document).ready(function(){
$("#details").mouseover(function() {
$("#show").show("slide", {}, 1000);
});
</script>

</head>
<body>
<div id="details">keyword</div>
<div id="show" style="display:none;"></div>
</body>

I have to place the show div at the middle of the page on mouseover on details div.Can u tell me how it can be done.....

Thanks.........................

A: 

If you're talking about a lightbox effect, there are lots of jQuery plugins available to handle this for you. Some examples:

http://leandrovieira.com/projects/jquery/lightbox/

http://colorpowered.com/colorbox/

http://jqueryui.com/demos/dialog/

Jimmy Cuadra
its not the light bos..Say i have some long text in the div so i want to display it else where in the page..Hope i am clear with this.............
Hulk
A: 

Since you're already using the jQuery UI, I think the dialog component would be an easy way to make it happen.

Hooray Im Helping
+2  A: 

Something like this?

    $("#details").mouseover(function() {
        var theTop = ($(window).height() / 2) - $('#show').height();
        $("#show").show().css({margin:'0 auto', top:theTop});
    });
patrick dw
This is was what i was looking for.....
Hulk