$('body').desktop({ apps: [{ name: 'Computer', icon: 'images/computer.png', width: 800, height: 400, left: 200, top: 50, href: '_layout.html' },{ name: 'Network', icon: 'images/network.png', left: 300, top: 100 },{ name: 'Monitor', icon: 'images/monitor.png', left: 400, top: 150 }], menus: [{ text: 'About Desktop', handler: function(){ $('body').desktop('openApp', { icon: 'images/win.png', name: 'About', width: 400, height: 200, href: '_about.html' }) } },{ text: 'System Update...', handler: function(){ $('body').desktop('openApp', { name: 'System Update' }) } }] });
名称 | 类型 | 描述 | 默认 |
---|---|---|---|
shortcutSize | number | The shortcut icon size。 | 90 |
winWidth | number | The default width of window。 | 600 |
winHeight | number | The default height of window。 | 300 |
wallpaper | string | The image of the wallpaper。 | null |
buttons | selector | The buttons selector to append to the taskbar。 | null |
名称 | 参数 | 描述 |
---|---|---|
options | none | Return the options object。 |
openApp | app |
Open an application.
代码实例: $('body').desktop('openApp', { icon: 'images/win.png', name: 'About', width: 400, height: 200, href: '_about.html' }) |
setWallpaper | wallpaper | Set the wallpaper for the desktop。 |
getOpenedApps | none | Return all the opened apps。 |