stickyWinHTML buttons: as many as you want
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)
Follow @clientcide on twitter to get notified of new posts.
To follow me personally on twitter, follow @anutron.
April 4th, 2007 at 11:22 am
Awesome! You are the man…thanks a lot.