I''m using the script.alico.us slide in / slide up script from an onclick of a link (but added a fade out instead). Everything is working perfectly except for a couple issues.. For reference, I put it up to: http://www.lolattack.com/popup/test3.html What I''m trying to replicate here is the login box that http://www.collegehumor.com/ is using and I think I''ve made considerable progress. I was wondering if it would be possible to replicate two more things from collegehumor into the same code from your modules. 1. Allowing the container that slides out from under the link to slide directly down and into the middle of the page. 2. Whilst the container is in the middle of the page, the rest of the page is "blacked out" or has a very high opacity of black (like Lightbox) so if the user clicks anywhere outside of the container, it close the popup or simply make it "fade away" like I am calling it to do when the "X" is clicked in the top right hand corner. Any and all help is welcomed! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
blechler
2008-Apr-21 14:36 UTC
Re: Help with javascript toggle and possible "lightbox" feature
I would create a new element that covers the view port, set some dark background colour on it, and set it''s opacity to something like 80%. The z-index will need to be higher than any other positioned element you may have on the page. Next I would have the login box appear with an even higher z-index. Finally I would create an event listener for a click associated with the opaquifying (dark background) overlay that would call a function that dismisses the login box. Perhaps I would even go so far as to register an event listener to check to see if the Esc key had been pressed. Register a resize event listener that changes the size of your overlay in case the user resizes their window while they have the login lialog open. Hope that helps. Bernie On Apr 21, 7:41 am, pkr <fours...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m using the script.alico.us slide in / slide up script from an > onclick of a link (but added a fade out instead). Everything is > working perfectly except for a couple issues.. > > For reference, I put it up to:http://www.lolattack.com/popup/test3.html > > What I''m trying to replicate here is the login box thathttp://www.collegehumor.com/ > is using and I think I''ve made considerable progress. > > I was wondering if it would be possible to replicate two more things > from collegehumor into the same code from your modules. > > 1. Allowing the container that slides out from under the link to slide > directly down and into the middle of the page. > 2. Whilst the container is in the middle of the page, the rest of the > page is "blacked out" or has a very high opacity of black (like > Lightbox) so if the user clicks anywhere outside of the container, it > close the popup or simply make it "fade away" like I am calling it to > do when the "X" is clicked in the top right hand corner. > > Any and all help is welcomed!--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---