Solved

Javascript backgroundColor - How To Set To Transparent

Posted on 2013-12-13
9
600 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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 500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
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…

726 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