siostrom
Posts: 6
Joined: Sun Sep 19, 2010 2:40 pm

How to add Dimming to HTML-box with full javascript?

Hi,

I have a HTML-box that contains two small images. When the box open, I don't want the background to dim but I want it to close the box when I click somewhere outside it. I have this idea that you can decrease the opacity on the dimming so it wonÔÇÖt be visible. Can anyone help me with the code for this?

I'm new to highslide and website making in general so it would be appreciated if you could be specific in the answer. :)
/Marcus
User avatar
RoadRash
Posts: 8249
Joined: Tue Jul 15, 2008 6:43 pm
Location: Fredrikstad, Norway
Contact: Website

Re: How to add Dimming to HTML-box with full javascript?

Hi Marcus,

Add dimminOpacity to your Highslide settings/highslide.config.js file:

Code: Select all

hs.dimmingOpacity = 0.5;
Set the background for .highslide-dimming in the highslide.css file to none.

Code: Select all

.highslide-dimming {
	/*position: absolute;*/
	background: none;
}
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no
siostrom
Posts: 6
Joined: Sun Sep 19, 2010 2:40 pm

Re: How to add Dimming to HTML-box with full javascript?

It didn't work. I couldn't notice any difference either.
User avatar
RoadRash
Posts: 8249
Joined: Tue Jul 15, 2008 6:43 pm
Location: Fredrikstad, Norway
Contact: Website

Re: How to add Dimming to HTML-box with full javascript?

You are using highslide-full.js as you indicate in the subject line?
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no
User avatar
RoadRash
Posts: 8249
Joined: Tue Jul 15, 2008 6:43 pm
Location: Fredrikstad, Norway
Contact: Website

Re: How to add Dimming to HTML-box with full javascript?

Can we please see your live page?
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no
siostrom
Posts: 6
Joined: Sun Sep 19, 2010 2:40 pm

Re: How to add Dimming to HTML-box with full javascript?

http://fotosidan.mine.nu/highslide/index.html

I've changed the color temporarelly to black. I hav also removed the X button and the frames around it. If you want you can still close it with [esc]
User avatar
RoadRash
Posts: 8249
Joined: Tue Jul 15, 2008 6:43 pm
Location: Fredrikstad, Norway
Contact: Website

Re: How to add Dimming to HTML-box with full javascript?

The javascript file you are using has this config in the header (java1.js):
Config: default +inline +ajax +iframe +flash
This is the config for highslide-with-html.js ÔÇô not highslide-full.js. You need to use highslide-full.js for the dimming to work.
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no
siostrom
Posts: 6
Joined: Sun Sep 19, 2010 2:40 pm

Re: How to add Dimming to HTML-box with full javascript?

I'm using the same file for a gallery with dimming and that one is working
siostrom
Posts: 6
Joined: Sun Sep 19, 2010 2:40 pm

Re: How to add Dimming to HTML-box with full javascript?

I'm sorry, you was right. Thank you VERY much for the help. :)
User avatar
RoadRash
Posts: 8249
Joined: Tue Jul 15, 2008 6:43 pm
Location: Fredrikstad, Norway
Contact: Website

Re: How to add Dimming to HTML-box with full javascript?

You're welcome. :)
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no

Return to “Highslide Editor”