Page 1 of 1

Close button for iframe only, not for the gallery

Posted: Tue Nov 13, 2012 11:11 am
by jjri
Hi
I have a gallery and an iframe on the same page.
I would like to add the "mac style" close button to the iframe only. It did not seem to me the Editor makes it possible.
is there a solution ? Thanks.

Re: Close button for iframe only, not for the gallery

Posted: Fri Nov 16, 2012 3:30 am
by RoadRash
Hi,

The HTML markup for your iframe probably looks like this:

Code: Select all

<a href="highslide/sample-includes/include-short.htm" onclick="return hs.htmlExpand(this, { 
			objectType: 'iframe', width: 400, 
			creditsPosition: 'bottom left', headingText: 'Title from onclick', 
			wrapperClassName: 'titlebar' } )">Iframe</a>
Add slideshowGroup: 'html' to the onclick:

Code: Select all

<a href="highslide/sample-includes/include-short.htm" onclick="return hs.htmlExpand(this, { 
			objectType: 'iframe', width: 400, 
			creditsPosition: 'bottom left', headingText: 'Title from onclick', 
			wrapperClassName: 'titlebar'[hilight], slideshowGroup: 'html'[/hilight] } )">Iframe</a>
Open your highslide.config.js file and add slideshowGroup: 'html', to the code for the close button:

Code: Select all

hs.registerOverlay({
	[hilight]slideshowGroup: 'html',[/hilight]
	html: '<div class="closebutton" onclick="return hs.close(this)" title="Close"></div>',
	position: 'top right',
	useOnHtml: true,
	fade: 2 // fading the semi-transparent overlay looks bad in IE
});