A fullscreen image gallery made with jQuery and CSS.

Simple and elegant image gallery made by a combination of some previous scripts/tutorials posted on this blog.
As of 23/01/2011 the gallery features next/previous image functionality via buttons and keyboard arrows. Thumbnails scrolling function has been optimized significantly. The demo and .zip files are updated.
The code
The css with some custom font via Google font API
@import url(http://fonts.googleapis.com/css?family=Josefin+Sans+Std+Light);
html,body{height:100%;}
*{outline:none;}
body{margin:0px; padding:0px; background:#000;}
#toolbar{position:fixed; z-index:3; right:10px; top:10px; padding:5px; background:url(fs_img_g_bg.png);}
#toolbar img{border:none;}
#img_title{position:fixed; z-index:3; left:10px; top:10px; padding:10px; background:url(fs_img_g_bg.png); color:#FFF; font-family:'Josefin Sans Std Light', arial, serif; font-size:24px; text-transform:uppercase;}
#bg{position:fixed; z-index:1; overflow:hidden; width:100%; height:100%;}
#bgimg{display:none; -ms-interpolation-mode: bicubic;}
#preloader{position:relative; z-index:3; width:32px; padding:20px; top:80px; margin:auto; background:#000;}
#thumbnails_wrapper{z-index:2; position:fixed; bottom:0; width:100%; background:url(empty.gif); /* stupid ie needs a background value to understand hover area */}
#outer_container{position:relative; padding:0; width:100%; margin:40px auto;}
#outer_container .thumbScroller{position:relative; overflow:hidden; background:url(fs_img_g_bg.png);}
#outer_container .thumbScroller, #outer_container .thumbScroller .container, #outer_container .thumbScroller .content{height:170px;}
#outer_container .thumbScroller .container{position:relative; left:0;}
#outer_container .thumbScroller .content{float:left;}
#outer_container .thumbScroller .content div{margin:5px; height:100%;}
#outer_container .thumbScroller img{border:5px solid #fff;}
#outer_container .thumbScroller .content div a{display:block; padding:5px;}
.nextImageBtn, .prevImageBtn{display:block; position:absolute; width:50px; height:50px; top:50%; margin:-25px 10px 0 10px; z-index:3; filter:alpha(opacity=40); -moz-opacity:0.4; -khtml-opacity:0.4; opacity:0.4;}
.nextImageBtn:hover,.prevImageBtn:hover{filter:alpha(opacity=80); -moz-opacity:0.8; -khtml-opacity:0.8; opacity:0.8;}
.nextImageBtn{right:0; background:#000 url(nextImgBtn.png) center center no-repeat;}
.prevImageBtn{background:#000 url(prevImgBtn.png) center center no-repeat;}
The jQuery scripts and plugins inside head tag
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script> <script src="jquery.easing.1.3.js" type="text/javascript"></script>
The full javascript code is inserted in the end of the document, just before the closing body tag.
<script>
//config
//set default images view mode
$defaultViewMode="full"; //full, normal, original
$tsMargin=30; //first and last thumbnail margin (for better cursor interaction)
$scrollEasing=600; //scroll easing amount (0 for no easing)
$scrollEasingType="easeOutCirc"; //scroll easing type
$thumbnailsContainerOpacity=0.8; //thumbnails area default opacity
$thumbnailsContainerMouseOutOpacity=0; //thumbnails area opacity on mouse out
$thumbnailsOpacity=0.6; //thumbnails default opacity
$nextPrevBtnsInitState="show"; //next/previous image buttons initial state ("hide" or "show")
$keyboardNavigation="on"; //enable/disable keyboard navigation ("on" or "off")
//cache vars
$thumbnails_wrapper=$("#thumbnails_wrapper");
$outer_container=$("#outer_container");
$thumbScroller=$(".thumbScroller");
$thumbScroller_container=$(".thumbScroller .container");
$thumbScroller_content=$(".thumbScroller .content");
$thumbScroller_thumb=$(".thumbScroller .thumb");
$preloader=$("#preloader");
$toolbar=$("#toolbar");
$toolbar_a=$("#toolbar a");
$bgimg=$("#bgimg");
$img_title=$("#img_title");
$nextImageBtn=$(".nextImageBtn");
$prevImageBtn=$(".prevImageBtn");
$(window).load(function() {
$toolbar.data("imageViewMode",$defaultViewMode); //default view mode
if($defaultViewMode=="full"){
$toolbar_a.html("
").attr("onClick", "ImageViewMode('normal');return false").attr("title", "Restore");
} else {
$toolbar_a.html("
").attr("onClick", "ImageViewMode('full');return false").attr("title", "Maximize");
}
ShowHideNextPrev($nextPrevBtnsInitState);
//thumbnail scroller
$thumbScroller_container.css("marginLeft",$tsMargin+"px"); //add margin
sliderLeft=$thumbScroller_container.position().left;
sliderWidth=$outer_container.width();
$thumbScroller.css("width",sliderWidth);
var totalContent=0;
fadeSpeed=200;
var $the_outer_container=document.getElementById("outer_container");
var $placement=findPos($the_outer_container);
$thumbScroller_content.each(function () {
var $this=$(this);
totalContent+=$this.innerWidth();
$thumbScroller_container.css("width",totalContent);
$this.children().children().children(".thumb").fadeTo(fadeSpeed, $thumbnailsOpacity);
});
$thumbScroller.mousemove(function(e){
if($thumbScroller_container.width()>sliderWidth){
var mouseCoords=(e.pageX - $placement[1]);
var mousePercentX=mouseCoords/sliderWidth;
var destX=-((((totalContent+($tsMargin*2))-(sliderWidth))-sliderWidth)*(mousePercentX));
var thePosA=mouseCoords-destX;
var thePosB=destX-mouseCoords;
if(mouseCoords>destX){
$thumbScroller_container.stop().animate({left: -thePosA}, $scrollEasing,$scrollEasingType); //with easing
} else if(mouseCoords<destX){
$thumbScroller_container.stop().animate({left: thePosB}, $scrollEasing,$scrollEasingType); //with easing
} else {
$thumbScroller_container.stop();
}
}
});
$thumbnails_wrapper.fadeTo(fadeSpeed, $thumbnailsContainerOpacity);
$thumbnails_wrapper.hover(
function(){ //mouse over
var $this=$(this);
$this.stop().fadeTo("slow", 1);
},
function(){ //mouse out
var $this=$(this);
$this.stop().fadeTo("slow", $thumbnailsContainerMouseOutOpacity);
}
);
$thumbScroller_thumb.hover(
function(){ //mouse over
var $this=$(this);
$this.stop().fadeTo(fadeSpeed, 1);
},
function(){ //mouse out
var $this=$(this);
$this.stop().fadeTo(fadeSpeed, $thumbnailsOpacity);
}
);
//on window resize scale image and reset thumbnail scroller
$(window).resize(function() {
FullScreenBackground("#bgimg",$bgimg.data("newImageW"),$bgimg.data("newImageH"));
$thumbScroller_container.stop().animate({left: sliderLeft}, 400,"easeOutCirc");
var newWidth=$outer_container.width();
$thumbScroller.css("width",newWidth);
sliderWidth=newWidth;
$placement=findPos($the_outer_container);
});
//load 1st image
var the1stImg = new Image();
the1stImg.onload = CreateDelegate(the1stImg, theNewImg_onload);
the1stImg.src = $bgimg.attr("src");
$outer_container.data("nextImage",$(".content").first().next().find("a").attr("href"));
$outer_container.data("prevImage",$(".content").last().find("a").attr("href"));
});
function BackgroundLoad($this,imageWidth,imageHeight,imgSrc){
$this.fadeOut("fast",function(){
$this.attr("src", "").attr("src", imgSrc); //change image source
FullScreenBackground($this,imageWidth,imageHeight); //scale background image
$preloader.fadeOut("fast",function(){$this.fadeIn("slow");});
var imageTitle=$img_title.data("imageTitle");
if(imageTitle){
$this.attr("alt", imageTitle).attr("title", imageTitle);
$img_title.fadeOut("fast",function(){
$img_title.html(imageTitle).fadeIn();
});
} else {
$img_title.fadeOut("fast",function(){
$img_title.html($this.attr("title")).fadeIn();
});
}
});
}
//mouseover toolbar
if($toolbar.css("display")!="none"){
$toolbar.fadeTo("fast", 0.4);
}
$toolbar.hover(
function(){ //mouse over
var $this=$(this);
$this.stop().fadeTo("fast", 1);
},
function(){ //mouse out
var $this=$(this);
$this.stop().fadeTo("fast", 0.4);
}
);
//Clicking on thumbnail changes the background image
$("#outer_container a").click(function(event){
event.preventDefault();
var $this=$(this);
GetNextPrevImages($this);
GetImageTitle($this);
SwitchImage(this);
ShowHideNextPrev("show");
});
//next/prev images buttons
$nextImageBtn.click(function(event){
event.preventDefault();
SwitchImage($outer_container.data("nextImage"));
var $this=$("#outer_container a[href='"+$outer_container.data("nextImage")+"']");
GetNextPrevImages($this);
GetImageTitle($this);
});
$prevImageBtn.click(function(event){
event.preventDefault();
SwitchImage($outer_container.data("prevImage"));
var $this=$("#outer_container a[href='"+$outer_container.data("prevImage")+"']");
GetNextPrevImages($this);
GetImageTitle($this);
});
//next/prev images keyboard arrows
if($keyboardNavigation=="on"){
$(document).keydown(function(ev) {
if(ev.keyCode == 39) { //right arrow
SwitchImage($outer_container.data("nextImage"));
var $this=$("#outer_container a[href='"+$outer_container.data("nextImage")+"']");
GetNextPrevImages($this);
GetImageTitle($this);
return false; // don't execute the default action (scrolling or whatever)
} else if(ev.keyCode == 37) { //left arrow
SwitchImage($outer_container.data("prevImage"));
var $this=$("#outer_container a[href='"+$outer_container.data("prevImage")+"']");
GetNextPrevImages($this);
GetImageTitle($this);
return false; // don't execute the default action (scrolling or whatever)
}
});
}
function ShowHideNextPrev(state){
if(state=="hide"){
$nextImageBtn.fadeOut();
$prevImageBtn.fadeOut();
} else {
$nextImageBtn.fadeIn();
$prevImageBtn.fadeIn();
}
}
//get image title
function GetImageTitle(elem){
var title_attr=elem.children("img").attr("title"); //get image title attribute
$img_title.data("imageTitle", title_attr); //store image title
}
//get next/prev images
function GetNextPrevImages(curr){
var nextImage=curr.parents(".content").next().find("a").attr("href");
if(nextImage==null){ //if last image, next is first
var nextImage=$(".content").first().find("a").attr("href");
}
$outer_container.data("nextImage",nextImage);
var prevImage=curr.parents(".content").prev().find("a").attr("href");
if(prevImage==null){ //if first image, previous is last
var prevImage=$(".content").last().find("a").attr("href");
}
$outer_container.data("prevImage",prevImage);
}
//switch image
function SwitchImage(img){
$preloader.fadeIn("fast"); //show preloader
var theNewImg = new Image();
theNewImg.onload = CreateDelegate(theNewImg, theNewImg_onload);
theNewImg.src = img;
}
//get new image dimensions
function CreateDelegate(contextObject, delegateMethod){
return function(){
return delegateMethod.apply(contextObject, arguments);
}
}
//new image on load
function theNewImg_onload(){
$bgimg.data("newImageW",this.width).data("newImageH",this.height);
BackgroundLoad($bgimg,this.width,this.height,this.src);
}
//Image scale function
function FullScreenBackground(theItem,imageWidth,imageHeight){
var winWidth=$(window).width();
var winHeight=$(window).height();
if($toolbar.data("imageViewMode")!="original"){ //scale
var picHeight = imageHeight / imageWidth;
var picWidth = imageWidth / imageHeight;
if($toolbar.data("imageViewMode")=="full"){ //fullscreen size image mode
if ((winHeight / winWidth) < picHeight) {
$(theItem).attr("width",winWidth);
$(theItem).attr("height",picHeight*winWidth);
} else {
$(theItem).attr("height",winHeight);
$(theItem).attr("width",picWidth*winHeight);
};
} else { //normal size image mode
if ((winHeight / winWidth) > picHeight) {
$(theItem).attr("width",winWidth);
$(theItem).attr("height",picHeight*winWidth);
} else {
$(theItem).attr("height",winHeight);
$(theItem).attr("width",picWidth*winHeight);
};
}
$(theItem).css("margin-left",(winWidth-$(theItem).width())/2);
$(theItem).css("margin-top",(winHeight-$(theItem).height())/2);
} else { //no scale
$(theItem).attr("width",imageWidth);
$(theItem).attr("height",imageHeight);
$(theItem).css("margin-left",(winWidth-imageWidth)/2);
$(theItem).css("margin-top",(winHeight-imageHeight)/2);
}
}
//Image view mode function - fullscreen or normal size
function ImageViewMode(theMode){
$toolbar.data("imageViewMode", theMode);
FullScreenBackground($bgimg,$bgimg.data("newImageW"),$bgimg.data("newImageH"));
if(theMode=="full"){
$toolbar_a.html("
").attr("onClick", "ImageViewMode('normal');return false").attr("title", "Restore");
} else {
$toolbar_a.html("
").attr("onClick", "ImageViewMode('full');return false").attr("title", "Maximize");
}
}
//function to find element Position
function findPos(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
curleft = obj.offsetLeft
curtop = obj.offsetTop
while (obj = obj.offsetParent) {
curleft += obj.offsetLeft
curtop += obj.offsetTop
}
}
return [curtop, curleft];
}
</script>
The markup
The $defaultViewMode variable allows you to change the default images view mode. You can set the value to:
- normal – images fit in window (all image data is visible)
- full – images expand to window size (fullscreen)
- original – images keep their original sizes (centered on the screen)
The rest of configuration options you can set within the script are:
- $tsMargin – first and last thumbnail margin (for better cursor interaction)
- $scrollEasing – scroll easing amount (0 for no easing)
- $scrollEasingType – scroll easing type
- $thumbnailsContainerOpacity – thumbnails area default opacity
- $thumbnailsContainerMouseOutOpacity – thumbnails area opacity on mouse out
- $thumbnailsOpacity – thumbnails default opacity
- $nextPrevBtnsInitState – next/previous image buttons initial state (“hide” or “show”)
- $keyboardNavigation – enable/disable keyboard navigation (“on” or “off”)
That’s all! The images used on the demo are artwork of Tobias Roetsch. You’re free to use/modify this script however you like (donations are welcome)






195 Comments
Awesome m8. U have some great tutorials.
Is this slideshow cross-browser compatible?
cheers
Keep up the excellent work
Thanks
I’ve checked it on the latest versions of Opera, Firefox, Safari, Chrome and IE8. Should work on older browsers too.
Great tutorial!
How can I use the function “clicking on large image loads the next one” like in the SIDEWAYS tutorial?
Thanks a lot
In order to work, it needs extra coding and you can’t just copy the function from the other script. Unfortunately I don’t have time to implement this feature on this gallery at the moment (maybe in the coming weeks). To be honest, it seems a bit overkill to have that feature on this script cause you already have all the thumbs in the same place as the large image.
Angel, I updated the script and added next/previous image navigation via buttons and keyboard arrows
You can also just added the “nextImageBtn” link around the large image in your HTML. Just be sure to specify the styles for this class in your css so the button style doesn’t effect this big link!
Great code! I’m working on a site using your fullscreen image gallery and one set of images is 1654 by 1654 px, while another is 1654 by 2828 px. The image is centred when it’s fullscreen, which is great; that’s exactly what I want. But while I can scroll down to see the bottom portion of these images (again at fullscreen), I can’t scroll up to see the top. Any suggestions on how best to tweak this?
Hi,
I need to see an example and the code of what you described in order to help. On this script, by default you see all portion of images (landscape and portrait). If you change the view mode to “maximize” (upper right corner icon) images are displayed in full-size which is ideal for landscape images since the majority of displays and monitors are widescreen.
this is such a killer gallery, thank you. my question is similar to @Werner’s: when “maximized” i can’t scroll vertically, is there a way to include that? also, on your sideways gallery you have an “original” view mode as well and although i see mention of it in the tut and code i couldn’t figure out how to do it (horizontal scroll in this case would be great). thanks again.
Nice… Now only if it had support for arrow keys for navigation prev/next image
I meant Keyboard arrow keys**
I’ll probably give it a try when I have time. Thanks for the suggestion.
Edit: Done! (finally…)
hey
is there any way to make the thumbs not to fade if you not rolling over them with the mouse?
Hi,
Yes. To completely disable the fade effect of the thumbs just delete or convert to comment (add “/*” at the beginning and “*/” at the end) this block:
/* $outer_container.fadeTo(fadeSpeed, 0.8);
$outer_container.hover(
function(){ //mouse over
var $this=$(this);
$this.stop().fadeTo(“slow”, 1);
},
function(){ //mouse out
var $this=$(this);
$this.stop().fadeTo(“slow”, 0);
}
); */
Alternatively, inside the code above you can change the fade-in/out value of the thumbs block for mouse-over and mouse-out by changing the values of 1 and 0 inside $this.stop().fadeTo(“slow”, 1); lines. A value of 1 means no transparency, value 0.5 for semi-transparency, 0 for complete transparency etc.
I am really enjoying using this elegant gallery (if you care to take a look, it’s at my website address above)
Is there any way to disable a user’s browser tool-tips though?
I keep getting the titles of the images popping up over the large images and the thumbnails. I wanted to give image descriptions by putting them into the titles, and it did work, except the tooltips are now huge!
Help?
thx
Hi Ron,
The browser tooltips appear when elements (such as images) have the title attribute (e.g. title=”image title”). If you remove the titles from the images you won’t get any tooltips. I strongly suggest though that if you want a description for images you should leave titles or at least give images alt attributes (e.g. alt=”your description”).
I have tried using you terrific ‘Pimp-my-Tooltips’ with this gallery and succeeded in sending the browser’s tooltips to 100000000 millisecond oblivion. Unfortunately, ‘title’ no longer appears in the upper left-hand corner of this image gallery.
Is there a way to make these two play nice together? Perhaps the gallery can use ‘alt’ or something? I’m new to this adapting scripts stuff and really appreciate your generosity.
thx
For the gallery to utilize “alt” instead of “title” attributes find the line “var title_attr=$this.children(“img”).attr(“title”);” (commented: get image title attribute) inside the script and simply change “title” to “alt” (e.g. var title_attr=$this.children(“img”).attr(“alt”);). This will also make tooltips plugin work along with the upper-left corner titles
It works! I can now have a short description of each image in the ‘Title’ and no annoying tooltip popping up. Thank you so very much.
beautiful work you have done here.
is there a simple way to have the sideshow open straight away in full screen mode, instead of having it as an option. (so it’s always full screen)
i thank you in advance for your time
j
Hello Jamie and thanks for your comments.
To have full screen mode by default add this code in the script:
$toolbar.data(“imageViewMode”,”full”);
as the first thing inside $(window).load function.
Also you should change the upper-right image icon and link in the html by inserting this:
<a href=”#” title=”Restore” onClick=”ImageViewMode(‘normal’);return false” rel=”nofollow”><img src=”toolbar_n_icon.png” width=”50″ height=”50″ /></a>
inside the <div id=”toolbar”>
is there a way to make it auto scroll? like fade in the next image after 4 secs or so…
Auto scroll implementation requires some additional coding. I’ll see if I can implement it on a future date (I’m a bit short on time at the moment) and let you know.
Hello !
you made such good work !
I wanna know if I could slow down abit the thumbnail scroller ?
it scroll abit too fast for me !
Thanks!
Hi Johnny,
The thumbnails container position depends on the position/movement of the cursor so you can’t really change the scolling “speed”. What you can do thought is play with the ease amount to make movement smoother or more exact. In the script, find the line:
var animSpeed=600; //ease amount
and change the 600 (milliseconds) to see the results.
Hi there, first of , real nice plugin!
I got it working pretty smooth over here, the only problem that i have, is that the thumbnails dont work :/
They don’t size down but it shows a piece of the large image at the bottom of the screen instead..
So i was wondering, could you explain me where you exactly create the thumbnails?
Thanx in advance!
Hello,
The thumbnails and the actual size images are located in the same folder (“images”). Notice that thumbnail files have a “_thumb” suffix in the filename. So you need to create the thumbnails for each of your images. Auto-sizing all the images would not be efficient and would affect performance and loading time significantly.
Thanks for your reply, i have another problem now however…
When i load a page, it only displays the loading icon…Not the slideshow.
But when i refresh the page, it appears just fine. Been messing around with the code but i’m not really good in Jquery so, perhaps you would be so nice to take a look?
Hello,
Does this happen in a particular browser? e.g. only on Firefox?
better than supersized 2.0 with the thumbnail navigation…good.
even good if it have the easing sliding background instead of fade in out.
Hi,
Your simple gallery is very great, thanks.
But i wonder if it could be possible to add a semi-transparent description at the bottom of each images?
Thanks in advance.
Hi Yannick,
The easiest way is to style #img_title div to how you want your description to look like. This div gets the contents of the title attribute of each image so adding your description to the title attributes will work just fine without any extra coding
Ok, thanks, I’ll try it.
Just one thing more, why, when you maximise an image, you can’t scroll up to the top but only to the bottom?
@Yannick
Actually you should not be able to scroll the image at all. How/where that happens?
That happens on all my images, when I “Maximize”.
I can scroll to the top but not to the bottom…
Regard
Hello, wonderfull code
But i have a question:
I have images in 1680 x 375 and i want the BG div to be the same size as the images (1680×375), so i tried to change the code but the problem i got is when i do it the image shows like 1680×100 px, i don’t know what i’m doing wrong.
Also i want to set the DIV bg (where the images appear) in the middle of page or wherever i need.
Thank you in advance
Mario
Great script! Really like it, great job. I sorta have the same problem as Mario, wanting images to have a fixed size of 1024×768 and centered, instead of fullscreen. Is there a possibility to implement this, on way or another?
Thanks in advance!
I’ll update a bit the code in few days and I’ll try to implement and automate features mentioned in the latest comments. Thanks for the input everyone.
Edit: Done @mario, @Jim check the new code and re-download updated files.
Thanks I’ll check it now
@malihu: thanks for your quick reply and edit of the code! This site is a great inspiration, will visit regularly!
Hi,
What a lovely gallery
If you could make it accessible by arrow keys I would be very grateful.
Thank you in advance,
albert
albert, I updated the script and among others, I’ve added next/previous image navigation via buttons and keyboard arrows
Fantastic piece of work! Very fresh approach too.
One question if I may.
Is there a way to tie a link (say pointing to a new page) to the big image?
Again great work.
Best wishes
Charles
Hi Charles,
Yes you can wrap the large background image (img id=bgimg) inside an ancor link. Depending on how you want it to work, you would probably need to add the links addresses to each of your thumbnails (e.g. as a “rel” attribute on their ancor tags) and pass it to the large image when you click them via js.
If you provide more details I might be able to create a demo variation.
Thanks for your comments
Thanks for replying.
I mean clicking the background image (or maybe the title text which could contain a read more… hot link) might point to a new page with more detail regarding the big image.
Yes, it’s fairly simple
You need to wrap the large background image inside an anchor tag with a unique id (e.g. #bgimg_link).
Next, add a “rel” attribute on each one of the thumbnail links which will hold the additional url you want.
Finally, inside the script find the #outer_container click function and add a single line of code that’ll get the “rel” attribute of the thumbnail and set it as the href value of the #bgimg_link, for example:
$(“#bgimg_link”).attr(“href”,$this.attr(“rel”));
Oh well, I think it’s more simple to do it than describe it… I’ve made a script version here:
http://manos.malihu.gr/tuts/malihu-jquery-image-gallery/malihu-jquery-image-gallery_charles.html
nice tutorial, i have a full size gallery too on my portfolio at http://referenzen.webdesign-portfolio.de/ . hope you enjoy
Your scripts and tutorials are really awesome, thank you for all these great resources! Is there a way to make the images different sizes and and center in the div.? Right now I have a test page set up I am trying to configure at http://www.timscottdesigns.com/test.html
Hello and thanks a lot for your comments
The script has the ability to load different image sizes, landscape and/or portraits. Inside the script check the first line:
//set default images view mode
$defaultViewMode=”normal”; //full, normal, original
Setting the “defaultViewMode” variable to “original”, the large images won’t stretch or scale. If the original images width/height is less than the browser window, they’ll be centered inside it.
Thank you for your quick reply. I am trying to center the pictures inside a div smaller than the window size. How do I change the part in the following code to center off of a div instead of the window width and height?
//Image scale function
function FullScreenBackground(theItem,imageWidth,imageHeight){
var winWidth=$(window).width();
var winHeight=$(window).height();
if($toolbar.data(“imageViewMode”)!=”original”){ //scale
var picHeight = imageHeight / imageWidth;
var picWidth = imageWidth / imageHeight;
if($toolbar.data(“imageViewMode”)==”full”){ //fullscreen size image mode
if ((winHeight / winWidth) picHeight) {
$(theItem).attr(“width”,winWidth);
$(theItem).attr(“height”,picHeight*winWidth);
} else {
$(theItem).attr(“height”,winHeight);
$(theItem).attr(“width”,picWidth*winHeight);
};
}
$(theItem).css(“margin-left”,(winWidth-$(theItem).width())/2);
$(theItem).css(“margin-top”,(winHeight-$(theItem).height())/2);
} else { //no scale
$(theItem).attr(“width”,imageWidth);
$(theItem).attr(“height”,imageHeight);
$(theItem).css(“margin-left”,(winWidth-imageWidth)/2);
$(theItem).css(“margin-top”,(winHeight-imageHeight)/2);
}
}
Thank you again in advance, you can see what I am talking about at my previous comment link.
Hello again!
I’ve checked your page. In order to do what you describe, you should do the following:
a) Open scrthumb2.js and set the defaultViewMode to normal:
$defaultViewMode=”normal”;
b) Inside FullScreenBackground function, change the values of the first 2 variables (winWidth and winHeight) so they get the dimensions of bg div instead of window:
var winWidth=$(“#bg”).width();
var winHeight=$(“#bg”).height();
That’s all you need. If you copy-paste the code from this comment, remember to re-type the wordpress quotes
Thank you so much. That is exactly what I was trying to do but had it on original and did not put the quotes around #div. Keep up the great work!!
hi,
Great slideshow! This is the best solution I could find for a fullscreen slideshow.
The only thing I am realy missing is the next and the prev. You already said we need tot look at the sideways slideshow. I am new with jquery en experimented a lot with both the slideshow but cant get the next en prev buttoms working.
I am guessing I first need to load the next image in the script but I don’t even know what I’m doing.
This is what I’ve made so far. The button is working but there’s no target.. Could you help me further?
jQuery("#next").click(function ()
{
$bgimg.attr("src", "").attr("src", this); //change image source
});
Hello Alec,
I’m planning to implement a next/previous image function on this gallery, so if you could wait a bit I’ll let you know when it’s ready.
Hi again Alec,
I’ve finally implemented a next/previous image function on the gallery
Your’e my hero!
I would like to learn jquery myself. Perhaps you would know best where I can begin? Do you have a few clear tutorials site for me?
Check these:
http://www.learningjquery.com
http://www.learningjquery.com/2010/07/great-ways-to-learn-jquery
http://www.quora.com/jQuery/What-are-the-best-websites-to-learn-jQuery
http://docs.jquery.com/Tutorials
Learning the basics of any scripting language is not that hard. Basically you need to create as many scripts as possible and view other people source code to gain some experience on how to code better.
If you have any background in scripting, javascript/jquery is fairly easy (if for example you’re familiar with actionscript, as I was, javascript is extremely easy to follow).
In my opinion 1-2 good books and Google is all you need
Tnxs!
I only do HTML and CSS so there’s a lot i need to reed/learn. Do you know some good books?
Javascript:
JavaScript Step by Step
http://my.safaribooksonline.com/9780735624498
Sams Teach Yourself JavaScript in 24 Hours
http://1tl.gr/8A
JavaScript & DHTML Cookbook
http://1tl.gr/8B
jQuery:
jQuery: Novice To Ninja
http://www.sitepoint.com/books/jquery1/
jQuery Fundamentals
http://jqfundamentals.com/book/book.html
Learning jQuery 1.3
https://www.packtpub.com/learning-jquery-1.3/book?mid=220409c024ep
Hi,
What a lovely gallery , nice job, and thanks alot for sharing.
I have the same issue that Alec, and I´m praying for your next/prev solution.
Thanks a lot
Hello and thank you for all of your scripts!
I am putting together a site with multiple scrollers and a couple of gallery windows. I am not able to get the “normal” defaultViewMode to work on the other gallery windows except on the first mural gallery. Coffee on me for any relief you can bring me for this headache, make that 2 cups. My test page is at http://www.timscottdesigns.com/tester1.html
- thank you in advance for any help
I figured it out, coffee on me anyhow… cheers!
Thanks! I like the implementation of horizontal scrolling for your galleries
Hi malihu, can we implement slider instead of fade in images & when we press up and down key bottom from keyboard thumbnail slider up and down. Thankyou in advanced for any help.
Hello,
It would be a completely new script as the code required to do what you suggest, differs a lot from the current one. If I get some time, I might develop a version of this gallery. Thanks for the suggestion!
Hello and thank you. Great job!
I just trying now the template and I’d like to ask you about the way how to get the portrait pictures in fit height?
And I have a flash menu bar with backgorund color under text but when I use the gallery template I loose this colour. Do you have any idea to change it?
Thank you!
Check your flash parameter wmode. It should be window.
When I change mode to window the landscape pictures don’t fill the browser and it would be great if portrait picture would be resized at the browser height and landscape picture to the width.
Is it possible?
Hi again!
I have another question. Is it possible to get back the loading picture in full screen mode? Originally this line:
…because I miss it always when I’m clicking back on previous button.
Thanks again!
The loading icon is always visible. If the images are cached, they fade in and out almost instantly cause no preloading is needed.
Perhaps the problem is that the first thumb doesn’t work on slide bar.
I copied the code again and it is working. hmmm! I’m happy
It will be slideshow also? So can auto play?
I might implement an autoplay feature when I get some time. Thanks for the suggestion!
Hi,
It works fine and I made a lots of tricks with my page.
I have maybe my last question:
When the page loaded the thumb scroller is showing and hidden only after the mouse was on.How is possible to auto hide it?
The thumbs scroller is initially visible in order to help users see the thumbnails area, so In my opinion, hiding the thumbnails on page load, might have a negative impact on user experience.
If you still want to hide it, find the line inside the script:
$thumbnails_wrapper.fadeTo(fadeSpeed, $thumbnailsContainerOpacity);and change it to:
$thumbnails_wrapper.fadeTo(fadeSpeed, 0);Hello!
I was wondering if it’s possible to disable the thumbnails and just use the navigational arrows.
Thank you so much for sharing this and everything else on your site. I purely use html/css, but you have inspired me to start learning jQuery/Javascript.
Hello Johan and thank you for your comments
If you want to disable thumbnails, do the following:
a) In css, add display:none; to #thumbnails_wrapper
b) Inside script, comment the code block from:
//thumbnail scroller...
untill:
...$this.stop().fadeTo(fadeSpeed, $thumbnailsOpacity);
}
);
c) Still inside the script, find the window resize function and comment the lines:
$thumbScroller_container.stop().animate({left: sliderLeft}, 400,"easeOutCirc");
var newWidth=$outer_container.width();
$thumbScroller.css("width",newWidth);
sliderWidth=newWidth;
$placement=findPos($the_outer_container);
To enable thumbnails just un-comment the code and remove display:none;
Hello Malihu,
I loaded 150 pictures into the gallery and the thumbnail scroll is very strange.
At the left of the monitor is working fine but when I moving the mouse to the right on it, it’s getting to be faster and just running around.
Hey lplugo! There’s a known jquery bug that prevents animate values over 9999 pixels. I believe that your problem is due to that bug.
I’ve posted a quick fix on some other posts about this. Please check http://manos.malihu.gr/jquery-thumbnail-scroller. At the end of the post you can read the solution and implement it in the script
Thank you Malihu!
It’s working. Perfect.
Thanks again!
Hi,
very nice, thanks for sharing your knowledge.
Question. Does this also work on iPad?
Thanks!
The scroller works on mouse move so it won’t work so well (if at all) on ipad. In general, only click events work on ipads, so it’s very limiting on what you can do. A version of this gallery for touch devices (like ipad) should have a totally different scroller.
Hi Malihu!
Thank you for you reply. However i encountered a small problem: When I run your demo file in internet explorer 7, when i click the next image button, the currently displayed image shuffles for a sec to the right of the browser window. It doesn’t happen in internet explorer 8.
Do you have any suggestions of how to fix this?
W
Hi there!!
Hey bro – is it easy to change the fade out/fade in effect to a cross dissolve?.. if it’s not too much trouble, I’d love to use it. Many thanks from Melbourne.
Fagan
Hello! By cross dissolve you mean cross fading images or pixel dissolve transition effect?
Hello malihu –
to be honest – i’m not entirely sure what the difference is, I’m hoping to achieve a simple dissolve between the 2 images upon loading the next image. Your current version (once a thumb is clicked) fades to a black page with the loading bar is and then fades into the new image.
I would like the process to be – user clicks, then a progress bar runs along the top like this site.. http://www.flashcomponents.net/component/xml_full_screen_photo_gallery/preview/2551.html – then the new image dissolves in from the other image fast. I’m fairy new to coding but your tutorials are helping me out ALOT. thanks so much for investing time into helping others, it’s inspired me to do the same. F
thought I’d check as well.. how do you recommend layering a div on top of this? I would like to add a description and copy etc about the image but have it fade in like the thumbnails once a user ‘clicks’ anywhere on the image. I’ve been trying different methods but I’m stabbing in the dark.
Cross fading images is doable but it’d need some additional work to implement it on the script. Basically you need to load the next/previous image on a different div (e.g. #bg2) with a greater or lower z-index than the #bg and apply fade ins and outs on the 2 divs, depending on which one you want to show each time.
To make it a bit more efficient, you’d need to change the z-index via jquery .css() each time you want to fade it in, so you only fade the div with the greater z-index. This would be better because more than one fade at a time has negative impact on performance.
Unfortunately there is no way to make a percentage loader indicator with javascript (you’d need a server-side lang like PHP, but this is not recommended and best avoided). The link you posted does this cause it’s made entirely with flash.
If I find some time, I might try implementing cross fading images on this script and post an update.
Are you interested in some custom work that I am happy to pay for. I doubt it will take you very long since it’s all based on this script you have already created.
Sure, please send me an e-mail with details
Hi Malihu,
Did a fade effect ever get implemented? Would love to add that in on one of my sites.
Let me know, thanks!
@Nick
Not yet…
I’m really short in time these weeks working on multiple projects.
At the moment, the little time I get to update the blog usually goes to answering user questions and comments (which seems like a full-time job in itself).
When I get some time to implement such a feature, I’ll post an update here.
Hi! I like very much this plug-in, thanks for sharing. Here is code for autoplay that created for my project. I hope it will be useful. Just place it below the main script
//
// yak, 2011-02-14
// add simple slideshow functionality
//
var slideshow_enabled = true; // enable or disable the slideshow on page load
var slideshow_delay = 6000; // slideshow delay in msec.
var slideshow_extra_delay = 6000; // slideshow additional delay (when directly clicking on a thumbnail), in msec
var slideshow_timeout=false;
var slideshow_real_delay=slideshow_delay;
if(slideshow_enabled){
var increase_delay_func=function(event){
slideshow_real_delay=slideshow_delay+slideshow_extra_delay;
window.clearTimeout(slideshow_timeout);
slideshow_timeout=window.setTimeout(slideshow_loop,slideshow_real_delay);
};
$("#outer_container a").click(increase_delay_func);
slideshow_timeout=window.setTimeout(slideshow_loop,slideshow_real_delay);
}
function slideshow_loop(){
slideshow_real_delay=slideshow_delay;
$nextImageBtn.trigger('click');
slideshow_timeout=window.setTimeout(slideshow_loop, slideshow_real_delay);
}
Thanks a ton for posting the autoplay code
I’ll check and implement it as soon as possible
It’s working only need a pause button.
Hi,
could you advice me what code i have to insert for a “pause” button?
Thank you very much!
Alessio
HI
Thanks for giving us a great jquery image gallery.
I need your help in changing the effect, sliding the image from Right to Left.
Is that possible?
In order to implement a slide effect you’d need to include jQuery UI. To do this, inside the head tag of the document add:
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>right below jQuery library:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>Next, inside script, find (line: 202):
$preloader.fadeOut("fast",function(){$this.fadeIn("slow");});and change it to:
$preloader.fadeOut("fast",function(){$this.show("slide",{direction:"right"},1000);});changing the 1000 value (milliseconds) that represents the sliding animation time, to whatever you want.
Hi malihu,
Thank You for your reply.
It works beautifully
Thanks a ton
Thank you so much for this awesome gallery!
Only question I have is what licence is it under?
Creative Commons Attribution 3.0 License (http://creativecommons.org/licenses/by/3.0/)
great!
where should be attribution placed? on gallery? on footer? in comment on top of source code?
Anywhere you like. A comment in source code is fine
THANK you for this plugin! I love it.
I had a question, is there a way to place elements in sub of a large image?
My goal is to have a div box with text only appear when you click that specific image. Do not want it to show on every image/page just a certain image (I hope I made sense haha)
Thank you again!
Nice!
Any way to start preloading rest of the full screen images while the user is busy looking at the first ones? That would cut down on waiting time
Check here:
http://stackoverflow.com/questions/476679/preloading-images-with-jquery
Hi malihu,
This is a beautiful script, thanks so much for it!
I have one question – I would like to add a “counter” somewhere on screen, that displays which image you are currently viewing (so it would ready “No. 2/9″).
Do you have any idea how I would accomplish this?
Let me know, thanks so much!
Thanks!
Get it here:
Seemed faster to do than describe it
http://manos.malihu.gr/tuts/malihu-jquery-image-gallery/malihu-jquery-image-gallery-imgCounter.zip
Brilliant. Thanks so much Malihu!
Just implemented this and it works great, thanks so much Malihu.
As a follow-up, any idea how to add a leading zero to the index numbers, if they are single digits?
Let me know, and thanks again!
Really great script! However in IE7 and IE8, the maximize/restore button doesn’t seem to work. When I add alert($(theItem).attr(“width”)); to the code before and after it is changed. the same value is being alerted in IE (1419 / 1419). In Firefox it has 2 different values (1920 / 1440). Do you know how to fix this? Thanks in advance!
Hello and thanks
I’ve tested the script extensively on IE8 (version 8.0.7600) and the demo works as it should (IE8/win7). What version you have?
IE7 is a different story. I usually don’t develop or test on IE7 as among others, has some major issues with browser resize js functions. You can try the following and see if it works:
In the script, change the way window resize function is called, from:
$(window).resize(function() {
});
to
window.onresize=function(){
}
keeping the code inside the function as it is.
Also, in the head tag of the document add:
<!--[if lte IE 7]>
<script>
window.onresize = null; //patch to prevent infinite loop in IE6 and IE7
</script>
<![endif]-->
Thanks for the quick reply! I got an email that it didn’t work in IE8 (didn’t test it myself yesterday), but turns out he was using IE7. IE8 works fine indeed. I’ll try the code you gave me. Thanks again!
how to change the speed of scrolling images at bottom? i think it is to fast to scroll. but i cant find what i will change.
The speed of scrolling depends entirely on mouse position, so there’s no scrolling speed value at all. You can only change scroll easing value ($scrollEasing) at the top of the script.
Hello, malihu, thanks for this great script. Is there a solution to eviter the balck flash(screen) between the transition. I want to say when user click the thumbnail, the image will truns to black, then appear a new image. Could it be FadeIn when the old image FadeOut simultaneous?
thinks for advance!
also is there a solution to replace the fade transition with a horizontal scroll left and right for the next and previous image respectively?
Malihu addressed this here:
In order to implement a slide effect you’d need to include jQuery UI. To do this, inside the head tag of the document add:
right below jQuery library:
Next, inside script, find (line: 202):
$preloader.fadeOut(“fast”,function(){$this.fadeIn(“slow”);});
and change it to:
$preloader.fadeOut(“fast”,function(){$this.show(“slide”,{direction:”right”},1000);});
changing the 1000 value (milliseconds) that represents the sliding animation time, to whatever you want.
better yet, here’s the link – http://manos.malihu.gr/simple-jquery-fullscreen-image-gallery#comment-4327
Heya Malihu. Thanks for this and also for other resources you gave us. I should say, I learn JQuery and JavaScript thanks to you.
I tried to mod something in this gallery but I stucked
How can I achieve to change dynamically maximize button’s href attribute with loaded image’s href and with some class declaration. I want to show maximized images some other way like this.
If it is impossible or you don’t have time for that, I can wrap big image with ‘a href’. But then I stuck again. I can not change the href attribute dynamically
Thanks again. I’m very grateful.
Hi Malihu,
I just wanted to thank you again for this awesome script and you’re hard work at keeping up with all of these comments! It’s much appreciated.
I know the requests come frequently here, but I also wanted to ask for the addition of the “cross fading images” technique for the fade effect. That would be an incredible addition to an already amazing script.
Let me know if you think that might be in the works.
Thanks Malihu!
Thanks Mr. Malihu for this useful script well this is a kind of stupid question but … Im using a Jquery script to drag a big image (6000px width / 1800px Height) and this awesome piece of code works like a charm the only problem is that fits/Resize the original size of the image i need to show it in the original fullsize i hope you can help me and thaks again!
Inside script change:
$defaultViewMode="full";
to
$defaultViewMode="original";
What a dummie
Thanks !!!
Hello,
I need to use portrait pictures. In fullscreen is possible to have scroll on mouse move, like this:
http://tympanus.net/Tutorials/FullPageImageGallery/
Thanks,
Cipo
I am looking for the same thing.. Anyone ?
Hi,
your gallery is very NICE!
I will ask, if is any chance to enable auto slideshow (switching images) after load?
Thx
Hi Andrew,
On February 14, Alex posted an auto-playing code for this gallery. Check his comment (permalink: http://manos.malihu.gr/simple-jquery-fullscreen-image-gallery#comment-4237)
Thanks again for a great script. Is there a simple way to implement a vertical thumbnail scroller with this gallery?
Hello!
Nice gallery!
I’m wondering how i could accomplish this:
When a user click’s on the image title to appear a lightbox or a popup with a external link ?
Thanks !
hi malihu,
I know I’ve asked this in the past, but I was wondering if you could tell me how to adjust this section of the script to make it so that it fades into the next image, rather than fading to black, and then to the next image:
//switch image
function SwitchImage(img){
$preloader.fadeIn("fast"); //show preloader
var theNewImg = new Image();
theNewImg.onload = CreateDelegate(theNewImg, theNewImg_onload);
theNewImg.src = img;
}
Let me know, and if this is something that takes extensive work I’d be willing to pay for it.
Thanks!
I am currently using your awesome style my tooltip with my gallery, so I already switched the “alt” instead of “title” attributes in the line “var title_attr=$this.children(“img”).attr(“title”);” to displat the alt atribut in the img_tile div . Is there a way to get, store, and display, the title tag when hovering over the image so that it will display title atrribute with the cursor tooltip instead of alt attribute, while still using the alt atrribute to display in the #img_title? Wow that was a confusing mouthful, any help would be very appreciated I feel like I am missing something simple.
Thanks again
http://www.timscottdesigns.com/art-murals.php
Hi, love your work…
but, I have a problem… I fixed de thumbs but, and imagine: … I have 90 images, and the thumbs are static and visible when i’m seeing de image, but when i move the mouse to one thumb it scrolls to the coordenate and the cursor gets hover other thumb… It is possible fix that? or simple remove the ‘auto scroller’ and add arrows? I am a bit in a hurry, if you can replay…
thank you so much for your time, and sorry my poor english.
Some amazing script here. Love it. Perfect. Very impressed and so simple to implement. Thanks very much for sharing
Hi I have created a gallery using your script so first as I mentioned above thanks very much.
I have a lot of images in the gallery and when you scroll to the far right. Towards the end the thumbnails start to act a bit strange. It seems the length is to long? I made the images smaller so the thumbnail area wouldn’t be so long and it seems to work fine. But my problem is it may get longer again? Is there a fix for this. So you can have unlimited images?
http://kemetdev.applab.net/galleries/57
Thanks in advance
Hello Joachim,
Sorry for such a late reply. Been extremely busy but such late reply takes no excuses, so I can only apologize.
Long story short: There’s a little bug in jquery library preventing proper animation of content longer than 9999 pixels.
The only workaround solution is to add a few lines of code in your document. The how-to is described here:
http://manos.malihu.gr/jquery-custom-content-scroller
Check the section named Scrolling long content and follow the same technique for this script
awesome job dude, i would like to know how can i make a menu bar also invisible on the same page like you have made the slidemenu below..
This is one of the greatest slide shows I have ever seen on the internet! As an amateur photographer I really appreciate your excellent work. The automatic resize function is particularly useful, and a rarity among the numerous slideshows available.
I have a suggestion how to further improve this product. If you may include a separate on the top EXIF information box, that would be really a useful feature for every photographers.
There are already working php codes to extract EXIF data from pictures, but usually the most frequently used fields are the Exposure time / F number / ISO speed.
I LOVE this script…. I’ve been playing with it for a bit and trying to get it to work the way I want to…. I have a photography site running WordPress where I really want to use this script on… Here is a link to my test site: http://test.digital-dreaming.com/ One of the things I’ve been doing is working on a plugin for WP… It’s very much on the 1. stage though…. That’s really not why I’m writing here though….
I’ve ran into a small problem with the thumbnails….. I have it placed vertically on the side…. Most of the time they work fine full screen but once I shrink my browser window I can’t scroll up or down til the end/beginning…. I hope I’m making some sense…… I have a feeling that it’s something ridiculously simple and I’m just not seeing it because I’ve stared at it for too long….
Another thing…. In the galleries on my current website the active thumbnail has a different color border around it…… It’s kind of difficult for me to explain (not native English speaking) but if you go here http://digital-dreaming.com/synishorn/born-2/ maybe you can see what I mean…… Pretty much I would like the current photo and thumbnail to match….. if that makes sense…..
Hello,
It working fine and adding the auto slide code make it better…I am working to insert your
simple menu at the top and one more needed option : navigate throught different “library”
let me explain : I need a thumnail bar smaller than the first one to choose a different photo serie ; your existing thumbnail bar will be detail of each serie. So clicking on the first thumbna
ooops…So clicking on the first thumbnail bring the content in the second thumnail bar. I am searchng for a week now a Drupal solution to be able to do a full screen gallery but nothing yet. Any cahnce you can do a drupal module?
Unfortunately I don’t have any knowledge in Drupal bali
firstly, please put some bold on your spam protection…I already write this message 2 times because I forgot to fullfil the spam field. About Drupal, it could also be WordPress even if it’s not a full CMS. To use a pure html script is really difficult in production site: if you have each day to hardcode your site to promote your new pictures it impossible. Thanks for the time where you make me dream for a dynamic full screen gallery…look like I have to continue my research.
I develop in WordPress so I might integrate this script with wp native gallery in the future. I’ll post an update here when I do. Thanks for your suggestion
Hello,
I am steel searching for a wordpress solution and I found something which is very close of the solution here: http://tympanus.net/codrops/2010/05/23/fresh-sliding-thumbnails-gallery-with-jquery-php/
As you surely know when using nextgen-gallery wordpress plug-in it will create a folder call gallery at the root of the wp-content folder… If you have a look to the codrops solution you will understand very quick why I am speaking about this: Using nextgen plugin keep you the possibility to manage your pictures easily and display them classicly also very easyly (have a look to my blog) Connecting the codrops solution to the right nextgen folders is not that difficult but… the ui is really much more nice on your version and with the auto slide script from Alex it’s almost perfect…only miss the codrops auto scan folder !!!! I am trying to mix your solution with the codrops solution but it’s really not that simple. Any chance you could do something for us?
The feature should be: your solution + Alex auto scroll + auto scan of the galleria folder and subfolder to collect pictures/thumbs and if not existing create folders, thumbs. Also collecting the nextegen pictures description should be nice…wow…too much?
@bali
Sounds cool and interesting project but it definitely needs time to build, which I don’t really have these days (way too much work).
In my view, what you suggest, might be done more easily with a custom php script that’ll scan the folders, fetch the images from filesystem and just echo the html.
Hello Malihu,
I wondered if its possible to have each image slide in from the left or right when clicking instead of fading out then in etc? Similar to flash based sites where images, products etc are sliding in from outside of the screen, across the screen, and then off again, non stop while you press the left and right arrows or click the left and right arrows on the screen.
Also is it possible to have certain sections of each image clickable using the html imagemap tag?
Thanks,
Jordan
Hello Jordan,
A quick modification of the script with the behavior you’ve described:
http://manos.malihu.gr/tuts/malihu-jquery-image-gallery/malihu-jquery-image-gallery-slidingEffect.html
Image-maps cannot implemented on the images of this gallery, unless you apply them dynamically via js every time a new image loads (which is probably a bit complicated since among others, images scale according to browser window).
Great example, i have added to my personal list in http://www.ajaxshake.com
Hi and thanks so much for this awesome script!
I changed it according to Alex’ modification, so now I have autoplay. But I also wanted the images to slide in instead of fading, and when I try to combine both, it doesn’t work anymore.
Could you please give me a hint, what I do have to modify so that both, the autoplay AND the slide effect works?
Thanks in advance!!
Hello malihu,
Indeed, it’s a very great gallery script. I really like it and thanks for your time building this. I have one question. With full screen mode, horizontal images are looks good, but vertical images are not. Is there anyway, we can do vertical images looking good at full screen mode ? Thank you.
With Regards,
Hi,
In fullscreen mode the image width is set to be equal to browser window width. Then, the script calculates image height according to its ratio and centers the image vertically.
Most (if not all) computer monitors are wide-screen, meaning that most landscape images will look great on fullscreen mode since most image data is visible.
Trying to do the same with most portrait images won’t be that good, simply cause we’re trying to display a long-height image on a wide-screen monitor, which of course results on losing much of the top and bottom image data (only the middle part of the image will be visible). On a 4:3 monitors, the same portrait images would look much better than on 16:9 wide-screens. It all depends on image and monitor screen ratio.
For this very reason I have implemented a “normal” mode, which is generally better for portrait orientation images, since you get to view all image data. Beyond that, there’s not much else we can do. There’s also an “original” mode which does not scale images at all (only centers them on the screen).
Other solutions would be to implement scrollbars, image panning on mouse movement, up/down button arrows etc. on portrait images, but all those features stray away from the simplicity of this particular script.
Wow, really really thank you for very much quick response. I didn’t expect I will get the very detail break down in few minutes. Yea I was thinking about image panning solutions as well. But the problem is, if we implement image panning inside, it will be clashed with thumbnails show and hide, because when we go down, thumbnails will be automatically appeared as well. So I will forget about doing that.
But one more question malihu, how easy to integrate your custom content scroller (http://manos.malihu.gr/jquery-custom-content-scroller) for thumbnails ? Because currently thumbnail scrolling looks quite tricky for me as a user. For example, at demo page, when i browse it, i saw the thumbnail photos at the bottom, I want to view the 3rd photo, so I go to thumbnail of third photo, but when my cursor is on to 3rd photo, thumbnails are start moving and my cursor point is on 5th photo. So I have to move my cursor again to 3rd photo. So it’s like quite weird, whenever I try to set cursor on some thumbnails, it’s start moving.
Any solutions for that ? By reading all the above messages, I know that you are quite busy, so really thank you for taking time to answer my questions.
And if you don’t mind, are you doing freelancing ? Because I really love all of your works.
With Regards,
I’ll try to find some time to update the thumbnails scroller in this gallery with the updated version of the plugin (http://manos.malihu.gr/jquery-thumbnail-scroller) which features a couple of additional ways of scrolling the thumbnail strip (including arrow buttons). I’ll post an update when I implement it
Yes I do freelancing (thanks for your feedback!).
PS: I wish day was like 48 hours so I could respond to each comment and create the gazillion scripts in my mind
Hi malihu,
Thanks for your quick response again. Really appreciate it. This is the first time that I get response from the open source developer very quickly
.
Yes, if you update the thumbnails scroller, it will be nice. I am really eager to see the updates.
Since you do freelancing, are you available now? I would like to get your email to contact to you directly. If you don’t want to publicize your personal email address, please kindly email me at apaunganhote@gmail.com. Because I am in urgent to get some custom modification for this jquery fullscreen image gallery script. (It will not be too complicated).
Thanks for your response again. I am looking forward to talk more. Thank you.
With Regards,
Dear malihu:
Again: an awesome job!
In this time i really need your help, in the example we can see the title tag, but whats happens if you need a description too, if is posible under the title example of this:
title: DENEBOLA
Description: This is a really nice image!
So how can i make this happens?
im really new in this so if you could help me thinking a very dumb person ill be great
Thanks for your time!
Really useful script but im trying to set a cookie for remember what was the last image that i see is theres a way to do this? Could you help me?
Cheers.
Hello Malihu,
First of all thank you very much for your work is very good!
My question is can in some way to anchor or id to the large photographs that can come from another page via a link to a specific photograph of the gallery?
Thanksgiving is a matter of life or death jejej.
Thank you thank you!!
Pd. Sorry for my bad English. I’m from Spain
Hi,
There’s no easy or simple way of accomplishing deep-linking. It would need extra code in either js or php or implementation of ready solutions such as http://www.asual.com/swfaddress/
Thank you very much for your reply I sent you a private email has arrived?
because I don’t understand what you say.
And I send you the case real.
Thank you very much for your time
regards
Carla
I am a beginner and your gallery is very impressive. We are building a image gallery and are exploring whether we could use it. Meanwhile is it possible to add a search function using the “title” in one corner so that on search it goes to the exact image.
Many thanks in advance for your reply and updated files.
Hello…
I had to change “$defaultViewMode” from “full” to “normal” because I use images with different resolution. But the problem is that I want the startup picture to show in full screen, to fill all the black spots. How can i do that ?
Thanks in advance…
Great Work.
Thanks Malihu.
Hi malihu,
Just like everyone else thanks so much for your work, I’m sure it has helped everyone a lot of time.
My question is I am trying to implement your ‘fullscreen with frame’ post into this solution, only with varied border widths, ie: top=20,left=20,right=20,bottom=60.
I am actually using landscape and portrait images so should use ‘normal’ mode, but I still need to have these borders so that I can have left and right columns, plus footer area on my page that the image would always stop at and not encroach into.
Any help would be appreciated, thanks again.
Still having difficulty with this one.
Have tried:
if ((winHeight / winWidth) > picHeight) {
$(theItem).attr(“width”,winWidth );
$(theItem).attr(“height”,picHeight*winWidth – 200);
} else {
$(theItem).attr(“height”,winHeight – 200);
$(theItem).attr(“width”,picWidth*winHeight – 240);
};
which gives me the borders, but on window resize it seems to resize the image in not constraint proportions. Any one have any ideas??
Hi Malihu,
This image gallery of yours is amazing piece of work, we hardly see this kind of good work around on internet these days.
Malihu, i want to use this image gallery in my website but we want the thumbnail strip to appear vertically on the right side of the screen, rather than being on the bottom of the screen in a horizontal format, can you suggest me how to do this without hampering the overall look and functionality of the gallery.
Thanks in advance,
Himanshu
Hi, Malihu
This is the gallery I can’t see in IE9. I tried with the demo and the full image not appear.
Only happens in my IE9? Thanks.
That’s weird. Have you checked it locally, online or both?
Both. With the demo and with the download version.
Hi Malihu,
Sorry to repeat a question but I am just having major difficulty with this problem.
Is it possible using this in ‘normal’ mode to have margin areas around the image.
I need to have margins around the page as (top:10,left:160,right:160,bottom:120) that the image will always stop at and not encroach into.
I have tried with css and altering the code but still cannot get it right.
Any help would be greatly appreciated.
Thanks.
Can you use dynamic data for the thumbnails and pictures?
Sure
Hi
malihu
Nice peice of work here – Its has made a world of difference to the website im currently constructing.
My problem or question is:
Is it possible to chnage the default image size for the #bgimg (background image the first image loaded)
Currently i have :
$defaultViewMode="normal";
this obviously sets all images to show 100% of the image in and browser size.
However it affects ‘all’ images, its there i way to set the Background (#bgimg)
to a different viewMode?
i tired :
$defaultViewModebg="normal";
and…
$(window).load(function() {
$bgimg.data($defaultViewModebg)
});
obviously this is wrong “/ ….
please assit thanks
Hi Malihu,
I try to implement your gallery with media queries. The problem is that when i change the dimensions of the thumbs (when resizing the browser window), the scrolling of the thumbs breaks…
Do u have any solution about resizing the thumbs without breaking the movement with media queries?
Thanx!
Really, Really, Awesome Work! Congratulations! I was wondering about thelicense of this work, Can I use this in my website? What about the “credits”? Thank you so much, greetings from Argentina.
Yes you can as long as you credit the source. You can attribute the source (e.g. this site and author) in your footer, as a side-note or even as a comment in the code
Thanks!
Great script and easy to setup!
Is there any way to view horizontal images in fullscreen, so it maybe scroll with the mouse cursor if that makes any sense.
Mouse on top of page= top of image
Mouse on bottom og page= bottom of image.
Its the only thing im missing from this.
Tnx again, great gallery.
I mean Vertical images off cause
Right now, vertical-portrait images are best viewed in normal view mode. I haven’t implemented image panning to keep script simple. I might give it a try and add image panning functionality in a future version though…
Hi malihu! Great work! I’m trying to combine this “Simple jQuery fullscreen image gallery” with the “jquery thumbnail scroller” from here http://manos.malihu.gr/jquery-thumbnail-scroller
I need the image gallery with multiple scrollers. Can you give me an advice how to do so? My idea is to rewrite every function and give them the number of the scroller as argument. How would you do that?
Thanks in advance!
Hi Malihu!
This is just great gallery!
Help me please, I need to add some navigation in top of the page and remove the restore button from top right corner.
When I add new div with navigation, navigation is visible a second or two on page loading and then hidden.
How can I make my navigation allways visible, and how can I remowe restore image button?
Thanks in advance and greetings from Croatia
Marijan
Removing the image resizing button is easy. Just search for
...an delete it.Ah, didn’t work here. I try again: Search for
...(without spaces) an delete it.OK last try: delete
div id="toolbar" ... /div(imagine some brackets here)I try everything and nothing sucessfull
hi this is a awsome work…. but i failed to implement the auto scroll the big image, can help me pls
Hi Malihu,
Thank you so much for your script and all your help in the comments section.
Is there a way to fade the images into each other instead of fading to black first?
Thanks
Stuart
Cross-fading is not available at the moment (at least not without big modifications in the script). I’ll definitely implement it (along with other transitions) in the next version.
Hi Malihu,
I choose to use this plugin on my project,
Because you try to answer, almost every question asked (meaning I have little chances of getting stuck). Keep up the good work.
I have TWO questions:-
1. I want to use
Example link : http://tympanus.net/Tutorials/OverlayEffectMenu/#
with your plugin, instead of the image thumbs.
2. I want to the background explode effect
Example link : http://www.samsung.com/ae/
Could you please guide me, if the above is possible and how to achieve it?
I would LOVE an auto slide option! And I will definitely buy you a coffee
Amazing work you’re doing here! Thanks a million!
malihu Sr awesome work here!!! Really great comented and really handy i just got one question, i been trying to change the thumbnails just for text. I do it the only thing is that i cant show the title for the fullscreen image theres a secret for this? Thanks for all your time and precious work!
Malihu! I hope my maths is good enough to get through the spam filter… I have a question. I’m planning on using this fantastic gallery for a photographer friend of mine and I’ve added a top nav div that works beautifully. Adding an equivalent footer, though, is a real headache! I just can’t seem to produce a bottom div that sits below the #bg no matter how much fiddling I do! At the moment the only way I have found is to reduce the height from 100% but that removes some of the image – no good…
can you help?
Adam
1. Great plug-in
2. Great images
3. Great plug-in
4. Question:
I noticed this doesn’t currently work well with a Touch device.
Would it be possible to use a timer and swipes events to ‘run the show’..
Here’s the thought…
Swipe from under bottom (max y) up into screen above thumb Y:
UI Comes up for X seconds then fades away.
When UI up.. swipe left right (anywhere on screen) moves the thumbs..
thumb click shows image and fades UI
When UI faded.. swipe left right (anywhere) loads next-prev
When UI up is up..
Swipe from above min UI Y through to bottom (max y) down past screen:
UI Comes fades away.
This should then not be overridden by the new iOS5 notifications gesture, as it originates from inside the app/ui area out.
I think it would really polish this plugin for nearly any device.
Hello, congratulations for the excellent tutorial.
I wonder if there is a possibility to make the background images go changing it without clicking next and prev. I want to leave the prev and next but I want the images to change automatically as well.
It would be very grateful if you could help me and thank you in advance.
14 Trackbacks
[...] Visit link: Simple jQuery fullscreen image gallery [...]
[...] Direct Link [...]
[...] you can do with it? You could implement it on things like this (see post) or this. Have fun and feel free to change it as you [...]
[...] Demo Download [...]
[...] Demo Download [...]
[...] Malihu [...]
[...] Malihu [...]
[...] Malihu [...]
[...] Malihu [...]
[...] Malihu [...]
[...] kullanacağım jqery eklentisini tanıtayım. Malihu-jquery-image-gallery resim galeri eklentisi. Eklentinin demosuna bakabilirsiniz. Yapacağım resim galerisi tam ekran [...]
[...] Malihu [...]
[...] Demo Download [...]
[...] Demo Download [...]