StickyWin.Fx

docs

The StickyWinFx.js file extends StickyWin so that it fades in an out (woot). In addition to that, if you also include StickyWinFx.Drag.js, then you can make the popup resizable and/or draggable. The class (StickyWin) is used in all three cases. If you don't include StickyWinFx.Drag.js, then the options for dragging and resizing won't work, but it won't break or anything.

new StickyWin({
  content: $('stickyWinContent').get('value'),
  fadeDuration: 600
});
execute this code

new StickyWin({
  content: $('stickyWinFxContent').get('value'),
  draggable: true,
  dragHandleSelector: 'div.handle',
  resizable: true,
  resizeHandleSelector: 'a.resizer',
  width: 300,
  height: 160
});
execute this code

Ok, it's not pretty, but what it looks like is up to you. Just style it like you would anything else on your page.

Using the StickyWin.ui function, here's a prettier draggable box:

new StickyWin({
  content: StickyWin.ui('the caption; drag here', 'this is the body', {width: '400px'}),
  draggable: true
});
execute this code

cnet-libraries/07-ui/06-stickywinfx.txt · Last modified: 2009/05/12 11:44 by aaron-n