开发者

Easiest Jquery/Javascript hover window?

I'm looking for the easiest solution, preferably integrated with Jquery, for opening a div / url in a hover windo开发者_开发百科w (javascript window). Any suggestions?


I find jQuery UI pretty easy, specifically the Dialog widget.

HTML:

<div id="myDialog" title="Basic dialog">
    <p>This is the default dialog.
       The dialog window can be moved, resized and
       closed with the 'x' icon.</p>
</div>

JavaScript (once the DOM is loaded):

$("#myDialog").dialog({autoOpen: false});

Then to open it:

$("#myDialog").dialog('open');

It has its own close button, or you can close it:

$("#myDialog").dialog('close');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜