Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Mar 2011
    Posts
    10
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Trying to change overlayopacity in fancybox

    I want to change the opacity so it's darker. I'm able to change the color in the css file, but I don't see the setting for overlay opacity anywhere. Research tells me it should be under the document ready function in my scripts.js file, but it's not there. http://www.danjdesign.com/portfolio/ is the page. Any help would be appreciated. Thanks.

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by Danger DANJ View Post
    I want to change the opacity so it's darker. I'm able to change the color in the css file, but I don't see the setting for overlay opacity anywhere. Research tells me it should be under the document ready function in my scripts.js file, but it's not there. http://www.danjdesign.com/portfolio/ is the page. Any help would be appreciated. Thanks.
    is in scripts.js line 86:
    Code:
    84 $(".fancybox").fancybox({
    85 'overlayShow': true,
    86 'overlayOpacity': 0.9
    but you have two document ready function, i guess this make both to not work.
    move content from second in first and try to see if work.

    best regards

  • #3
    New Coder
    Join Date
    Mar 2011
    Posts
    10
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by oesxyl View Post
    is in scripts.js line 86:
    Code:
    84 $(".fancybox").fancybox({
    85 'overlayShow': true,
    86 'overlayOpacity': 0.9
    but you have two document ready function, i guess this make both to not work.
    move content from second in first and try to see if work.

    best regards
    Oh, I added those 3 lines to try and get it to work. They weren't originally there. Adding those lines did nothing to change the opacity. I tried placing everything under one document ready function and that didn't work either. So, I still need help please.

  • #4
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by Danger DANJ View Post
    Oh, I added those 3 lines to try and get it to work. They weren't originally there. Adding those lines did nothing to change the opacity. I tried placing everything under one document ready function and that didn't work either. So, I still need help please.
    is hard to say where is the problem, need a closer debugging.
    Try to use firebug to debug:

    http://getfirebug.com/

    there is a extension for firefox who can help you.
    in order to make opacity to work you need your script to be loaded( javascript will stop to the first error and not continue).
    could be also a conflict between different parts. I don't know if my assumption is right but you have a lightbox which use a fadein/out who can use opacity.
    i would remove everything and put it back one by one to identify who is responsable for the problem.
    i'm sorry i can't help much more with this. Anyway if you find something i will try to help you if i can.

    best regards

  • #5
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    Not sure what you are trying to change the opacity of just yet.

    the code :

    $(".fancybox").fancybox({
    'overlayShow': true,
    'overlayOpacity': 0.9

    applies the opacity effect to any element with a class of fancybox, btu I'm nt seeing that class applied to any of you elements, unless I missed something

    If I'm seeing things correctly in firebug, this may be what you want to do:


    $("#fancy_overlay").fancybox({
    'overlayShow': true,
    'overlayOpacity': 0.9
    Last edited by DanInMa; 03-25-2011 at 06:22 PM.

  • #6
    New Coder
    Join Date
    Mar 2011
    Posts
    10
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by DanInMa View Post
    Not sure what you are trying to change the opacity of just yet.

    the code :

    $(".fancybox").fancybox({
    'overlayShow': true,
    'overlayOpacity': 0.9

    applies the opacity effect to any element with a class of fancybox, btu I'm nt seeing that class applied to any of you elements, unless I missed something

    If I'm seeing things correctly in firebug, this may be what you want to do:


    $("#fancy_overlay").fancybox({
    'overlayShow': true,
    'overlayOpacity': 0.9
    Thanks for the reply.

    I'm trying to change the overlay opacity of the background when the image pops up after clicking on a thumbnail. I read default was 0.3 but I can't seem to change it. I only see where to change the color in css #fancy_overlay div.

    I actually tried what you suggested already since that seemed like the obvious way to do it, but it didn't work. I tried again and still no luck.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •