inherit
169267
0
Nov 29, 2024 7:30:04 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Feb 13, 2016 12:02:19 GMT -8
Does anybody see anything wrong with this line of code? $('#wrapper').css('box-shadow','inset 0 0 ',''+blur+'px','#'+cshad+''); I had this working but now it's not. Thanks
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,022
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Feb 14, 2016 10:54:58 GMT -8
The error is in distinguishing between string start and string end since you must be always aware of how javascript will interpret it. I will assume blur and cshad are your variables and you are using the simple string form of jquery's .css(propertyName, value) method $('#wrapper').css('box-shadow','inset 0 0 ',''+blur+'px','#'+cshad+'');I've underlined the two arguments the jquery function expects in order to show you why the use of commas here causes an interpretation of a third and fourth argument which is of course ignored since this function signature is looking for only two arguments. I don't think you're trying to specify multiple box-shadows here so the use of commas is not needed and given the above value of ' inset 0 0 ' you would end up with no blur-radius or color defined. To include that in the second argument requires concatenating those strings into one $('#wrapper').css('box-shadow','inset 0 0 '+blur+'px #'+cshad);
|
|
inherit
169267
0
Nov 29, 2024 7:30:04 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Feb 14, 2016 14:16:10 GMT -8
Brian Thank you I see what you mean. The commas make it a separate entity. oh wait I tried without the commas and still didn't work
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,022
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Feb 14, 2016 17:07:03 GMT -8
Without an actual live example to prod and poke I cannot really tell you why it didn't work, it could be there's a CSS rule that makes sure inline styles cannot apply box-shadow by employing an important modifier (just one of a thousand reasons). Perhaps a description of exactly what you are trying to accomplish and what you're expecting to see would help. Here's an example of multiple shadows applied to a single element which as you can see is separated by a comma so the presence of a comma is not inherently the problem provided it was your original intention although it doesn't look like that is what you were after given the example offered. box-shadow:15px 19px red, -1em -1em 0.4em olive;
|
|
inherit
169267
0
Nov 29, 2024 7:30:04 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Feb 14, 2016 17:14:39 GMT -8
ChrisThis is my plugin "border around forum $(document).ready(function(){ var bac=pb.plugin.get('border_around_forum_plugin').settings.bafp; for(i=0;i<bac.length;i++) { var theme=bac .theme; console.log(theme); if(theme.length > 0){ for(r=0;r<theme.length;r++){ if(pb.data('user').theme_id==theme[r]){ var img=bac.image; var col=bac.background_color; var rad=bac.radius; var cshad=bac.s_color; var blur=bac.s_blur; var shad=bac.shadon; } } } } $('#wrapper').css('background-image','url('+img+')','background-repeat','no-repeat'); $('#wrapper').css('box-shadow','inset 0 0'+blur+'px #'+cshad+''); $('#wrapper').css('background-size','cover'); $('#wrapper').css('background-position','center'); $('#wrapper').css('background-color','#'+col+'); $('#wrapper').css('border-radius',''+rad+'px'); });
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,022
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Feb 14, 2016 17:27:28 GMT -8
$('#wrapper').css('box-shadow','inset 0 0'+blur+'px #'+cshad+''); An actual link to where it is "not working" would be the most efficient, remember the thousand reasons, but one error in that code you posted that stands out is you forgot to include a space between the y offset and the bur radius (i.e. there is no space after the '0' as in my example)
|
|
inherit
169267
0
Nov 29, 2024 7:30:04 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Feb 14, 2016 18:41:46 GMT -8
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,022
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Feb 14, 2016 19:06:06 GMT -8
Mike Brian OrdonezIt looks to be working to me, on that site you're currently setting it with $('#wrapper').css('box-shadow','inset 30px 30px 30px 400px #425163'); Since the color of the background isn't much different from the color you've chosen you can't really tell where shadow ends and background begins. If I change it to color gold with a spread of 40px for example then you see the contrast
|
|
inherit
169267
0
Nov 29, 2024 7:30:04 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Feb 15, 2016 15:05:00 GMT -8
Chrisone more question $(' title_bar') whats the identifier for class? I know # a id.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,022
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Feb 15, 2016 15:16:17 GMT -8
A class is prepended with a period (.) and an ID by the number sign (#)
As for the specifc class of a titlebar that would depend on which title bar you're referring to, $('.title-bar') would refer to most container titlebars such as quick reply or categories
$('.ui-dialog-title') would refer to dialog titles
there maybe others but you would need to be specific
|
|
inherit
169267
0
Nov 29, 2024 7:30:04 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Feb 15, 2016 15:18:59 GMT -8
Thanks thats answer
|
|
inherit
169267
0
Nov 29, 2024 7:30:04 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Feb 15, 2016 15:54:26 GMT -8
Chris$('.title_bar') .css ('background_color','#'+barcolor+''); doesn't work do you think there is more to title_bar?
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,022
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Feb 15, 2016 16:04:16 GMT -8
Generally in most standard themes a title bar has a background image applied to it so changing the color would not help if an image is covering it. I can't tell if this is this the case for you and whatever you are working on but if you wish help with figuring out something you're doing with a forum it is best to provide a link to the area you need assistance with, that is much more efficient than taking stabs in the dark offering guesses until one sticks
|
|
inherit
169267
0
Nov 29, 2024 7:30:04 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Feb 15, 2016 16:17:37 GMT -8
ChrisHere's the link-http://riccettstest.freeforums.net/
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,022
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Feb 15, 2016 16:32:23 GMT -8
I'm not seeing any background image applied there but CSS uses hyphenated value-names and value-properties so "background_color" should probably be "background-color" or it's camelhump equivalent "backgroundColor"
|
|