Jörn Zaefferer schrieb:
> Therefore my request to commit Thickbox to the jQuery subversion, to
> port back improvements from derivates, to improve whatever is possible
> (like the stuff Klaus did) and then to rule them (all those XXXbox
> derivates) all! In other words, make it a top level project, like they
> use to say at the Eclipse foundation :-)
I like the idea and would definitely put some more work into it. I'd
also like to see a solid namespaced approach. But the whole decision is
totally up to Cody.
Some more ideas: It would be very neat to have something like this:
$(...).thickbox();
That would come around problems if you have to (re)initialize the
thickbox for content that was fetched via XHR after the page has loaded.
By now, to achieve this, I have added an optional context parameter to
the TB_init function (and also have to change the class name if there
are already thickbox enhanced links in that context, ugh):
function TB_init(context) {
context = context || document.body;
$("a.thickbox", context).click(function(){
var t = this.title || this.name || null;
var g = this.rel || false;
TB_show(t, this.href, g);
this.blur();
return false;
}).removeClass('thickbox').addClass('thickboxed');
}
I also changed the script for inline content to preserve dynamically
attached events, which are as is not copied, because the script uses
innerHTML to move the content into the thickbox...
I can post that too if somebody is interested.
-- Klaus
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/