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');
}
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: http://tinyurl.com/qsdckd
(I am also using the jcarousel...
Thanks for that.
I've given it a go but can't get it to work. I think my problem lies down to the fact that I'm using a javascript image gallery to generate the images.
I am now looking to build a script that will add margin-top to images that have larger widths. I think this should work okay.
I am trying to vertically align my img's inside a div.
I have a series of portrait and landscape images which are generated through a javascript gallery (I add them as their full size images to the html and the script resizes them as thumbnails and creates the fullsize image in a specified div...
Thanks for all the help.
I've looked through the tutorials, and for ones relating to my problem they seem to suggest using full images for either the entire box or for two parts of a row. Unfortunately, my box needs to be resizable, so I can't use images that have set widths or height.
I...
Hi feherke,
Well, all images will be inside a div which will have it's own ID.
Or otherwise I am only using the 'Selected' and 'NonSelected' class for these images.
Not sure which one would be easier to use.
Thanks
Okay, sorry, I didn't initially regonise the similarity from my problem to radio buttons.
I have adapted the script very slightly like this:
<script type="text/javascript">
<!--
function ch(what)
{
what.className=what.className=='select'?'select':'select'
}
//-->
</script>
So now it only...
Thank you!
To take this further I trying to get the JavaScript to switch all other img classes to 'NonSelected', and I also don't want the img to be "de-selected" (i.e. switching back to 'NonSelected').
So to simplify:
OnClick on image 1 will change it's class to 'Selected' - if already...
I am trying to create curved borders using 8 divs (t, b, l, r, tl, br, bl, tr).
However, my problem is that the background of my page is a gradient, so I am having to use curved edges that are transparent. However, this means that the borders from my t, b, l and r divs are showing (which are...
Hi,
I am creating an image gallery and using javascript on my thumbnails to allow viewers to browse the gallery.
I have CSS classes for the thumbnails:
"Selected" and "NonSelected"
Nonselected have hover attributes and selected is enlarged.
How do I use javascript to change the class for...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.