On 26/02/07, Sam Collett <[EMAIL PROTECTED]> wrote: > On 26/02/07, Klaus Hartl <[EMAIL PROTECTED]> wrote: > > Hi jQuerians, > > > > I just committed what I would call Thickbox Reloaded alpha version. It > > may look the same pretty much, but is a complete rewrite. > > > > Here's what's new: > > > > * Chainable method to bind Thickbox to links and forms (makes it easy > > for content that gets loaded/created later on). > > * Totally unobtrusive: no classes needed for links, no params in URL. > > * Confirm type Thickbox, triggered automatically by binding Thickbox to > > a form. If "yes" the form gets submitted unless a custom callback is > > defined (for example for Ajax submitting) > > * Automatic type detection depending on type of element, respectively on > > type of link: > > image: href is an image > > content: href is a hash > > ajax: href is internal and not image > > iframe: href is external and not image > > confirm: element is form > > * Improved UI blocking (Thanks to Mike "Malsup" and the BlockUI plugin) > > * Options for width/height are now passed in as settings object literal > > or are stored as default values via $.thickbox.defaults({ width: 300, > > height: 400 }) > > * Options top/left positioning (instead of centering), unit defaults to 'px' > > * Easier skinning: The look is completely separated into an extra style > > sheet > > * Scrolling via mousewheel/touchpad is blocked > > * Lets you define custom animations for showing the modal window via > > settings > > * Requires jQuery 1.1.1 > > > > Maybe I have forgotten something. > > > > I thought of including the required style sheets dynamically, but you > > would still have to include the path somehow. > > > > You can also have a look here (besides repository): > > http://stilbuero.de/jquery/thickbox_reloaded/ > > > > Please note that I haven't tested in other browsers than Firefox yet. I > > just thought I'd like to request some feedback/code review first! > > > > > > -- Klaus > > Looking good so far. A couple of suggestions: > > A way to specify a link is to an image (perhaps by className). At the > moment, it just checks if the image has one of the common extensions. > It will fail if the image being linked to is dynamically generated > (and thus does not contain the extension) - i.e. > /showphoto.ashx?ContactID=23. The content type may not be known > beforehand, but it is certain to be an image. > > Long titles. Sometimes titles can be very long (especially if someone > else is supplying it), and when they are, you can't see all the text. > Perhaps the height of the title bar should by dynamic rather than > fixed. More a CSS issue than anything, but is would be good if the CSS > supplied with the plugin took this into account. This is what worked > for me: > > #tb-title-bar { > padding:0pt 0pt 0pt 6px; > } > > #tb-title-bar h2 { > margin:4px 14px 3px 0; /* 14px is to take into account the close image */ > } > > #tb-content { > /* removed all css */ > } >
Another suggestion: You can't use the tab key in the thickbox (except for external content, which is in an iframe anyway). You may want to add an example of a form within a thickbox (I've had to do some workarounds to get forms to work in ThickBox 2.1) _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/