Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with jquery plugin

Status
Not open for further replies.

leonnk

Programmer
May 1, 2009
11
0
0
I am using devkicks galleria jquery plugin to make a photo-gallery page.

To work the plugin I just add in my large images in a list and the plugin resizes them as thumbnails and creates a main_image which is switched.

Here is the link: (I am also using the jcarousel plugin to scroll the thumbnails).

My problem is I am unable to get landscape images to vertically align. Because the galleria javascript switches the large image on the page I am unable to give each individual image a margin.

So I am looking to add something into the galleria plugin which will either add margin to an image if over a certain width. Or, probably a better way is if I give each image a class either "landscape" or "portrait" in the html and the galleria script carries this forward to the main_image, so I could then style with css.

Hope this makes sense?

Thanks
 
I've got it:

Just added this to the onimage function:

if (image.height() < image.width()) {
$('#main_image').addClass('vert-child');
} else {
$('#main_image').removeClass('vert-child');
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top