Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Javascript backgroundColor - How To Set To Transparent

Posted on 2013-12-13
9
Medium Priority
?
624 Views
Last Modified: 2013-12-13
Hello, all.

I have a canned script that I want to use.

All is fine on it, except the background color - I would like it to be transparent.


I have embedded the script block here:

<script type="text/javascript">
			var grid;

			FWDUtils.onReady(function(){
				grid = new FWDGrid({
					//main settings
					gridHolderId:"myDiv",
					gridPlayListAndSkinId:"playlist",
					showContextMenu:"no",
					//grid settings
					thumbnailOverlayType:"icons",
					addMargins:"yes",
					loadMoreThumbsButtonOffest:4,
					thumbnailBaseWidth:278,
					thumbnailBaseHeight:188,
					nrOfThumbsToShowOnSet:27,
					horizontalSpaceBetweenThumbnails:8,
					verticalSpaceBetweenThumbnails:8,
					thumbnailBorderSize:0,
					thumbnailBorderRadius:0,
					thumbnailOverlayOpacity:.85,


					backgroundColor:"#000000",


					thumbnailOverlayColor:"#FFFFFF",
					thumbnailBackgroundColor:"#FFFFFF",
					thumbnailBorderNormalColor:"#b2b2b2",
					thumbnailBorderSelectedColor:"#009aff",
					//combobox settings
					startAtCategory:1,
					selectLabel:"SELECT CATEGORIES",
					allCategoriesLabel:"All Categories",
					showAllCategories:"no",
					comboBoxPosition:"topleft",
					selctorBackgroundNormalColor:"#FFFFFF",
					selctorBackgroundSelectedColor:"#009aff",
					selctorTextNormalColor:"#009aff",
					selctorTextSelectedColor:"#FFFFFF",
					buttonBackgroundNormalColor:"#FFFFFF",
					buttonBackgroundSelectedColor:"#009aff",
					buttonTextNormalColor:"#009aff",
					buttonTextSelectedColor:"#FFFFFF",
					comboBoxShadowColor:"#000000",
					comboBoxHorizontalMargins:12,
					comboBoxVerticalMargins:12,
					comboBoxCornerRadius:0,
					//ligtbox settings
					addLightBoxKeyboardSupport:"yes",
					showLightBoxNextAndPrevButtons:"yes",
					showLightBoxZoomButton:"yes",
					showLightBoxInfoButton:"yes",
					showLighBoxSlideShowButton:"yes",
					showLightBoxInfoWindowByDefault:"no",
					slideShowAutoPlay:"no",
					lightBoxVideoAutoPlay:"no",
					lighBoxBackgroundColor:"#e0e4e4",
					lightBoxInfoWindowBackgroundColor:"#FFFFFF",
					lightBoxItemBorderColor:"#b2b2b2",
					lightBoxItemBackgroundColor:"#333333",
					lightBoxMainBackgroundOpacity:.8,
					lightBoxInfoWindowBackgroundOpacity:.9,
					lightBoxBorderSize:1,
					lightBoxBorderRadius:0,
					lightBoxSlideShowDelay:4
				});
			})
		</script>

Open in new window




Could you, please, help me to make the "backgroundColor" transparent?


Thank you,
Shane
0
Comment
Question by:lshane
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 39717924
What about : http://www.w3.org/wiki/CSS/Properties/color/RGBA

backgroundColor:rgba(255, 0, 0, 0.0),

See compatibility : http://css-tricks.com/rgba-browser-support/
0
 
LVL 43

Expert Comment

by:Rob
ID: 39717949
That's assuming your plugin will accept rgba(...) as a valid argument.  I hope it does but but is the plugin you're using.  Do you have any more info on it, docs, api etc
0
 

Author Comment

by:lshane
ID: 39717953
Hi, leakim971.

Thank you for replying.


Yeah, I thought about that, but wasn't sure of the syntax.


I tried yours, just as you have it (no quotes), but it just doesn't load grid at all (photo gallery grid).

I tried with Single and Double quotes = Just defaults to a white-ish background.


I'm not sure if the linked .js files are negating it, or what.


Any other ideas?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 43

Expert Comment

by:Rob
ID: 39717959
Have you got a link to the photo gallery grid?  You may be able to target the element from outside of the grid but it would depend on the rendered html.
0
 

Author Comment

by:lshane
ID: 39717970
Hi, tagit.

I thought of that, too, but not sure.

I will attach the only .js file it is using in the site.
0
 

Author Comment

by:lshane
ID: 39717973
Oops - here's the file.
FWDGrid.js
0
 
LVL 43

Accepted Solution

by:
Rob earned 2000 total points
ID: 39717975
From the demos you could just use css:

#myDiv div:first-child {
    background-color: transparent !important;
}
0
 
LVL 43

Expert Comment

by:Rob
ID: 39717981
The !important will force it over everything else.
0
 

Author Comment

by:lshane
ID: 39718032
Absolutely BRILLIANT!

Thank you, tagit!!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question