0

I'm currently working on a project with some fancybox (inline content). I'd like to have the same kind of behavior that exists on facebook: when I click, the content is displayed in the fancybox, and if I scroll, I do scroll in the fancybox, but the background has to remain fixed.

I tried to mix a couple of ideas I've found here and there, mainly:

$(".jqShowArticle, .jqShowPortfolio").fancybox({
  'onStart'        : function(){
    $("body").css({"overflow": "hidden", "position": "fixed"});
    $("#fancybox-overlay").css({"overflow": "scroll"});
  },
  'onClosed'        : function(){
    $("body").css({"overflow": "auto", "position": ""});
  }
});

But it doesn't work... Here is the page: http://espresso.double-espresso.com/ You can click on every portfolio item (pictures with text appearing on hover...) or blog entry to see what it does...

Thanks a lot for your help!

1 Answer 1

0

There seems to be an answer on https://github.com/fancyapps/fancyBox/issues/24. I'm not sure how they do it exactly though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.