ProLoser/AnythingSlider — Issue #201: Display Image in its Normal Scale inside ColorBox/LightBox
Author: galaxym1
Created: 2011-10-19 16:42:43+00:00
State: open

Hello people, The AnythingSlider works perfectly with me, but I have a concern for displaying the photo in the ColorBox in its normal scale when the user clicks on the current slide. If you go to Demo Pages of AnythingSlider (http://proloser.github.com/AnythingSlider/demos.html) the first demo displays photos, and when you click on one of the photos, for example the first one, the colorbox/lightbox displays, but the width and height of the real image are modified, and they are not the same width and height of the real image. As you can see in the code below, inside colorbox, the width and height are changed to 90% of the page.This is the real image (http://proloser.github.com/AnythingSlider/demos/images/slide-civil-1.jpg), and you can see difference against the dimensions of the photo inside the ColorBox. Any workaround to make the colorbox/lightbox display the photo in its normal scale without specifying its dimensions? Could be there an option for colorbox to display the image in its normal scale. I would appreciate your help, and this could be an issue for others as well.

script code:
$(function(){
$('#slider1')
.anythingSlider({
toggleControls : true,
theme : 'metallic',
navigationFormatter : function(i, panel){ // add thumbnails as navigation links
return '';
}
})
// target all images inside the current slider
// replace with 'img.someclass' to target specific images
.find('.panel:not(.cloned) img') // ignore the cloned panels
.attr('rel','group') // add all slider images to a colorbox group
.colorbox({
width: '90%',
height: '90%',
href: function(){ return $(this).attr('src'); },
// use $(this).attr('title') for specific image captions
title: 'Press escape to close',
rel: 'group'
});
});

Thanks,
galaxym1