Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-25-2011, 03:35 AM   PM User | #1
Danger DANJ
New Coder

 
Join Date: Mar 2011
Posts: 10
Thanks: 3
Thanked 0 Times in 0 Posts
Danger DANJ is an unknown quantity at this point
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.
Danger DANJ is offline   Reply With Quote
Old 03-25-2011, 04:52 AM   PM User | #2
oesxyl
Master Coder


 
Join Date: Dec 2007
Posts: 6,682
Thanks: 436
Thanked 890 Times in 879 Posts
oesxyl is a jewel in the roughoesxyl is a jewel in the roughoesxyl is a jewel in the rough
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
oesxyl is offline   Reply With Quote
Old 03-25-2011, 05:40 PM   PM User | #3
Danger DANJ
New Coder

 
Join Date: Mar 2011
Posts: 10
Thanks: 3
Thanked 0 Times in 0 Posts
Danger DANJ is an unknown quantity at this point
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.
Danger DANJ is offline   Reply With Quote
Old 03-25-2011, 06:00 PM   PM User | #4
oesxyl
Master Coder


 
Join Date: Dec 2007
Posts: 6,682
Thanks: 436
Thanked 890 Times in 879 Posts
oesxyl is a jewel in the roughoesxyl is a jewel in the roughoesxyl is a jewel in the rough
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
oesxyl is offline   Reply With Quote
Old 03-25-2011, 06:12 PM   PM User | #5
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
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..
DanInMa is offline   Reply With Quote
Old 03-26-2011, 04:15 AM   PM User | #6
Danger DANJ
New Coder

 
Join Date: Mar 2011
Posts: 10
Thanks: 3
Thanked 0 Times in 0 Posts
Danger DANJ is an unknown quantity at this point
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.
Danger DANJ is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:18 AM.


Advertisement
Log in to turn off these ads.