?
Solved

Javascript backgroundColor - How To Set To Transparent

Posted on 2013-12-13
9
Medium Priority
?
613 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…
Suggested Courses

752 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