stickyWinHTML buttons: as many as you want

Wednesday, April 4th, 2007 @ 11:06 am | filed under: Examples, Widgets

I’ve refactored stickyWinHTML (see this previous post) a bit more to allow for as many buttons as you like.

Here’s a quick code example:

var simpleLayoutExample = stickyWinHTML('the caption', 'this is the body', {
  width: '400px',
  buttons: [
    {
      text: 'close',
      onClick: function(){alert('closed!')}
    },
    {
      text: 'okey-dokey',
      onClick: function(){alert('ok!')}
    }
  ]
});
$('layoutExample').adopt(simpleLayoutExample);

The buttons array allows for as many buttons as you like. You can see more detail in the wikitorial on this topic.

Note: the old options (closeTxt, onClose, confirmTxt, and onConfirm) are still supported, though deprecated.

No TweetBacks yet. (Be the first to Tweet this post)

One Response to “stickyWinHTML buttons: as many as you want”

  1. Michael Says:

    Awesome! You are the man…thanks a lot.