When you look at the Photo album the thumbnails line up and scroll horizontally in every browser. However when I click on Paintings the thumbnails go out of wack and different things on each browser, basically does not line up horizontally like it should.

I know .hide is what causes this to happen. If I take out the .hide script the two albums show up one after and another and the thumbnails for both line up horizontally in every browser.

I hope this make sense.

album

skald89,

Appears to be working now (Opera 11.50).

Did you fix it since posting?

Airshow

skald89,

Appears to be working now (Opera 11.50).

Did you fix it since posting?

Airshow

Not really. I did a stupid work around for now. I have one album fadeout in 0 milliseconds instead of hiding on load. I will post an updated link with the issue later tonight.

Skald,

Something's wrong with Daniweb notifications. They are arriving here up to several days late.

I see the issue in Opera.

Interesting that your workaround should be effective because fadeOut() performs a .hide() action as it completes.

With your workaround in place, does gallery2 successfully manually-hide then manually-show (ie by clicking "First"/"Second")?

Airshow

Skald,

Something's wrong with Daniweb notifications. They are arriving here up to several days late.

I see the issue in Opera.

Interesting that your workaround should be effective because fadeOut() performs a .hide() action as it completes.

With your workaround in place, does gallery2 successfully manually-hide then manually-show (ie by clicking "First"/"Second")?

Airshow

Yeah, if i do .fadeout the galleries appear normally and are able to be switched.

Skald,

In that case, I would say your workaround (.fadeOut(0)) isn't so stupid.

It does the job and I can't suggest anything better.

Airshow

That said, you could try this more sophisticated approach:

$(function() {
	//First find the two galleries and the First and Second buttons.
	var $galleries = $('.ad-gallery');
	var $first = $('#FIRST');
	var $second = $('#SECOND');
	
	//Then attach the gallery switching handlers
	var $first.click(function(e) {
		$galleries.eq(0).show();
		$galleries.eq(1).hide();
	});
	$second.click(function(e) {
		$galleries.eq(0).hide();
		$galleries.eq(1).show();
	});

	//Then all the dynamic descriptions/titles
	$('img.image1').data('ad-desc', 'Whoa! This description is set through elm.data("ad-desc") instead of using the longdesc attribute.<br>And it contains <strong>H</strong>ow <strong>T</strong>o <strong>M</strong>eet <strong>L</strong>adies... <em>What?</em> That aint what HTML stands for? Man...');
	$('img.image1').data('ad-title', 'Title through $.data');
	$('img.image4').data('ad-desc', 'This image is wider than the wrapper, so it has been scaled down');
	$('img.image5').data('ad-desc', 'This image is higher than the wrapper, so it has been scaled down');

	//Then (hopefully) the clever bit
	// initialise the galleries, with a callback to simulate a click on the First button, after internal initialisation.
	$galleries.adGallery({
		callbacks: {
			init: function() {
				$first.click();
			}
		}
	});
});

If it doesn't work then it's not sophisticated at all. Stick it in the bin.

Airshow

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.