jquery 简单的弹出页面 弹出层
XML/HTML Code
- <div id=page style="margin-top:20px;">
- <p>Click me to open a blank window. <button type=button onClick="var w = $().WM('open'); w.find('.windowcontent').html('some html content here (freejs.net)');">new window</button>
- <p>Click me to open a mini window <button type=button onClick="var w = $().WM('open', 'http://www.freejs.net'); w.addClass('autohide');">new window</button>
- <p>
- Here's some anchors links that have a class=jquery-wm attribute. These will open up in child windows.
- <a href=http://www.freejs.net class=jquery-wm>slashdot</a>,
- <a href=http://www.freejs.net class=jquery-wm>slickdeals</a>
- <a href=index.html class=jquery-wm>clone this page</a>
- <p>
- Open child windows using jquery object.
- <pre>
- var $w = $().WM('open','http://retrogames.com');
- // other jquery extensions that can be used on children windows
- $w.WM('maximize');
- $w.WM('minimize');
- $w.WM('raise');
- $w.WM('close');
- // open a window and manipulate the window content
- var $w = $().WM('open');
- $w.find('.titlebartext').text('foo');
- $w.find('.windowcontent').html('here is some content');
- </pre>
原文地址:http://www.freejs.net/article_jquerywenzi_343.html