Just landed some code that'll likely fix the issue: http://github.com/jquery/jquery/commit/5d49335eace4311de890b871e057d8b6e9122eb6
This was actually something that I wanted to fix a little while ago and forgot about. --John On Tue, Jan 12, 2010 at 5:37 PM, Karl Swedberg <k...@englishrules.com> wrote: > Okay, I reduced the code to the part that is producing the problem (there is > still some cruft in there, but I gotta run). It looks like the issue has to > do with changes in the .add() method. I must say that the manner of element > insertion used by the plugin author is rather unconventional. > On this page, you'll see a "close" graphic because the overlay stays > appended to the <body>: > http://test.learningjquery.com/slimbox/example.html > On this page, you'll see just a black background because the overlay is > first appended to the body and then appended to the bottomContainer along > with <a id="lbCloseLink">... > http://test.learningjquery.com/slimbox/example-1.4.html > Here is the reduced code in its entirety: > (function($) { > var overlay, center, image, sizer, prevLink, nextLink, bottomContainer, > bottom, caption, number; > $(function() { > // Append the Slimbox HTML code at the bottom of the document > $("body").append( > $([ > overlay = $('<div id="lbOverlay" />')[0], > center = $('<div id="lbCenter" />')[0], > bottomContainer = $('<div id="lbBottomContainer" />')[0] > ]) > ); > image = $('<div id="lbImage" />').appendTo(center).append( > sizer = $('<div style="position: relative;" />').append([ > prevLink = $('<a id="lbPrevLink" href="#" />').click(previous)[0], > nextLink = $('<a id="lbNextLink" href="#" />').click(next)[0] > ])[0] > )[0]; > bottom = $('<div id="lbBottom" />').appendTo(bottomContainer).append([ > // next line: looks like overlay is being added to the elements that are > appended, when author just wanted it added to elements bound to click > handler. > $('<a id="lbCloseLink" href="#" />').add(overlay).click(close)[0], > caption = $('<div id="lbCaption" />')[0], > number = $('<div id="lbNumber" />')[0], > $('<div style="clear: both;" />')[0] > ])[0]; > }); > function previous() { } > function next() { } > function close() { } > })(jQuery); > > > --Karl > ____________ > Karl Swedberg > www.englishrules.com > www.learningjquery.com > > > > On Jan 12, 2010, at 4:51 PM, Karl Swedberg wrote: > > Never mind. Here is the one with 1.3.2: > http://test.learningjquery.com/slimbox/example.html > And here is the one with 1.4rc1: > http://test.learningjquery.com/slimbox/example-1.4.html > Looks like #lbOverlay is being inserted in the wrong place with 1.4rc1. > Haven't looked at the code yet, so don't know why. Will investigate some > more. > > --Karl > ____________ > Karl Swedberg > www.englishrules.com > www.learningjquery.com > > > > On Jan 12, 2010, at 4:38 PM, Ralph Whitbeck wrote: > > Mark, > I am sorry but with all the other bugs and tasks John needs to get done > before launch can you please host an example so John doesn't have to do all > that? It would really save some time for him to be able to look at your > problem. > Thanks for understanding. > Ralph > > On Tue, Jan 12, 2010 at 4:14 PM, Mark Fraser <goo...@mfraz.orangehome.co.uk> > wrote: >> >> On Tuesday 12 Jan 2010 21:04:38 John Resig wrote: >> > Hmm, a bit vague - do you have an example? Also what browser did you >> > see this effect in? >> >> Sorry, >> Go to http://www.digitalia.be/software/slimbox2 and download Slimbox 2.03. >> Uncompress slimbox-2.03.zip. Open example.html in a text editor and change >> the >> first <script></script> to point to >> http://code.jquery.com/jquery-1.4rc1.js. >> >> Run example.html in Firefox 3.5.6 and click on 'Click here' the image >> appears, >> but the whole page darkens. >> >> In JQuery 1.3, the image appears on top of the darkened background. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "jQuery Development" group. >> To post to this group, send email to jquery-...@googlegroups.com. >> To unsubscribe from this group, send email to >> jquery-dev+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/jquery-dev?hl=en. >> >> >> > > -- > You received this message because you are subscribed to the Google Groups > "jQuery Development" group. > To post to this group, send email to jquery-...@googlegroups.com. > To unsubscribe from this group, send email to > jquery-dev+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/jquery-dev?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "jQuery Development" group. > To post to this group, send email to jquery-...@googlegroups.com. > To unsubscribe from this group, send email to > jquery-dev+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/jquery-dev?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "jQuery Development" group. > To post to this group, send email to jquery-...@googlegroups.com. > To unsubscribe from this group, send email to > jquery-dev+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/jquery-dev?hl=en. > >
-- You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-...@googlegroups.com. To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.