Giter Club home page Giter Club logo

photobox's Introduction

photobox

A lightweight CSS3 image & video viewer that is pretty to look and and easy to use.

Benefits

  • Lightweight! jquery.photobox.js is only 5kb (gziped & minified)
  • Silky-smooth, hardware accelerated, CSS3 transitions and animations (for better performance)
  • Support videos via iframe embedding
  • Stunning UI and user-friendly UX
  • Built so everything could be changed directly from the CSS
  • Observes DOM changes (if images were added/removed) and adapt accordingly
  • CSS3 pre-loader, tailored-made
  • Uses event-delegation on all thumbnails clicks (obviously...)
  • Uses HTML5 History to update location with the currently viewed image
  • The only image is a pre-loader animation for old IE. For the rest, no images at all!
  • Browsers support: IE8+ (graceful degradation), Modern browsers

Functionality

  • Images/videos can be zoomed in and out with mousewheel and navigated using mousemove to move around
  • Bottom row of thumbnails, navigated by mouse movement, can be resized using the mousewheel
  • Shows the image's 'alt' or 'title' attribute text at the bottom
  • Indicate the index of the current viewed image in relation to the total, like so: (36/100)
  • Touch-friendly swipe left/right to change image. Swipe up/down to toggle the thumbnails stripe
  • Supports looping after first and last images
  • Auto-playing of images at a set interval (see "time" in Settings)
  • Supports keyboard keys for navigation and closing the gallery view
  • In case there was an error loading an image, a message is shown, which can be configured via CSS

Basic use-case example:

<div id='gallery'>
    <a href="http://www.somedomain.com/images/image1_large.jpg">
        <img src="http://www.somedomain.com/images/image1_small.jpg"
            title="photo1 title">
    </a>
    <a href="http://www.somedomain.com/images/image2_large.jpg">
        <img src="http://www.somedomain.com/images/image2_small.jpg"
            alt="photo2 title">
    </a>
    <a href="http://www.somedomain.com/images/image3_large.jpg">
        <img src="http://www.somedomain.com/images/image3_small.jpg"
            title="photo3 title">
    </a>
    <a href="http://www.somedomain.com/images/image4_large.jpg">
        <img src="http://www.somedomain.com/images/image4_small.jpg"
            alt="photo4 title" data-pb-captionLink='Google website[www.google.com]'>
    </a>
    <a href="http://www.youtube.com/embed/W3OQgh_h4U4" rel="video">
        <img src="http://img.youtube.com/vi/W3OQgh_h4U4/0.jpg"
            title="PEOPLE ARE AWESOME 2013 FULL HD ">
    </a>
</div>
...
...
...
<script>
    // applying photobox on a `gallery` element which has lots of thumbnails links.
    // Passing options object as well:
    //-----------------------------------------------
    $('#gallery').photobox('a',{ time:0 });

    // using a callback and a fancier selector
    //----------------------------------------------
    $('#gallery').photobox('li > a.family',{ time:0 }, callback);
    function callback(){
       console.log('image has been loaded');
    }

    // destroy the plugin on a certain gallery:
    //-----------------------------------------------
    $('#gallery').photobox('destroy');

    // re-initialize the photbox DOM (does what Document ready does)
    //-----------------------------------------------
    $('#gallery').photobox('prepareDOM');
</script>

Videos

<div id='gallery'>
    ...
    <a href="http://www.youtube.com/embed/W3OQgh_h4U4" rel="video">
        <img src="http://img.youtube.com/vi/W3OQgh_h4U4/0.jpg"
            title="PEOPLE ARE AWESOME 2013 FULL HD ">
    </a>
    ...
</div>

A video link must have the rel attribute with the value of video. The url of the link must be the iframe embed (youtube, vimeo, etc.) And inside you can put a thumbnail of the video (of course)

Changing Effects Is Easy!

I designed Photobox (as an image viewer) to only show a single item at a time (image or video), and so, the changing between images works is that first the current image must transition itself "out", and the javascript code will "listen" to that transition, and when it's over, the code will reset some things to their initial state, replace the item with the new one, and will trantision that new item into view. The effects are done via CSS and are very easy to change!

The default transition is the the current image "grows" and fades out of view, and when it is completely gone, the new image will appear to grow, rotate until it is "flat" (a bit) and fade-in. Every time there's an image change that is either next or previous, the pbOverlay element will have a class for that change 'next' or 'prev', so you can work with those to achieve an effect like the images are moving to the sides, depending on the direction, for example, you can use this CSS snippet to achieve that:

.pbHide .pbWrapper > *,
.pbHide .pbWrapper > .prepare{ opacity:0; transition:.2s ease-in; }

.pbWrapper > div,
.pbWrapper > img{
    transition:.2s ease-out;
    opacity: 1;
}

/*** when going to the next slide ***/
/* prepare next slide which will be shown */
.pbWrapper > *,
.pbHide.next .pbWrapper > .prepare{ transform:translatex(40%); }
/* prepare current slide which will "go away" */
.pbHide.next .pbWrapper > *{ transform:translatex(-40%);  }

/* when going to the previous slide */
.pbWrapper > *,
.pbHide.prev .pbWrapper > .prepare{ transform:translatex(-40%); }
.pbHide.prev .pbWrapper > *{ transform:translatex(40%); }

Custom Caption Links

you can add your own links along with the title or alt attributes texts, just add data-pb-captionLink to the image thumbnail:

data-pb-captionLink='Google website[www.google.com]'

Overriding defaults

It is always recommended not to touch the source code directly, because then you will have a version which is out-of-sync with any future version, and you might face some difficult merges with your own changes. So, if you want to change some stuff, I would recommend creating another file, typically called jquery.photobox.mod.js. This good practice also applies for the CSS file.

Example:

/*!
    photobox modifications,
    after it has been loaded
*/

(function(){
    "use strict";
    // adding a "userInfo" HTML to the overlay container:
    var userInfo = $('<div class="userInfo"><img><span></span></div>');

    var photoboxCallbacks = (function(){
        // do something
    })();

    // change defaults:
    window._photobox.defaults.time = 0;
    window._photobox.defaults.beforeShow = photoboxCallbacks.beforeShow;

    // append "userInfo" after DOMReady has been fired
    // (the overlay won't exist in the DOM before then)
    $(document).ready(function(){
        var overlay = $('#pbOverlay');

        // add class to the default close button
        $('#pbCloseBtn').addClass('btn');

        // append user info DOM structure
        overlay.append(userInfo);
    });
})();

Settings

Name Info Default
single if "true" - gallery will only show a single image, with no way to navigate false
history Enable/disable HTML5 history using hash urls false
time The time in milliseconds when autoplaying a gallery. Set as '0' to hide the autoplay button completely. 3000, minimum of 1000 allowed
autoplay should the gallery autoplay on start or not. false
loop Loop back to last image before the first one and to the first image after last one. true
thumb A relative path from the link to the thumbnail (if it's not inside the link) null
thumbAttr A custom Attribute for the source of the thumbnail (for lazy-loaded thumbs) 'data-src'
thumbs Show thumbs of all the images in the gallery at the bottom. true
captionTmpl A string which is the template of the photo caption long string
zoomable Enable/Disable mousewheel zooming over images true
hideFlash Hide flash instances when viewing an image in the gallery true
wheelNextPrev change image using mousewheel left/right true
keys.close Key codes which close the gallery "27, 88, 67"
keys.prev Key codes which change to the previous image "37, 80"
keys.next Key codes which change to the next image "39, 78"

photobox's People

Contributors

glebm avatar humandane avatar makg10 avatar mishal avatar trysound avatar yaireo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

photobox's Issues

Issues with several galleries

Hi,

I try to put totally differents galleries on the same page, so I tried this:
< div id='gallery'>
< a class="affiches" href="img1.jpg">
< img src="img1.jpg" alt="photo1 title">
< /a>
< a class="affiches" href="img2.jpg">
< img src="img2.jpg" alt="photo2 title">
< /a>
[...]
< /div>
< div id='gallery2'>
< a class="mooreas" href="img1.jpg">
< img src="img1.jpg" alt="photo12 title">
< /a>
< a class="mooreas" href="img2.jpg">
< img src="img2.jpg" alt="photo22 title">
< /a>
[...]
< /div>
< script>
$('#gallery a').photobox({ thumbs:true });
$('#gallery2 a').photobox({ thumbs:true });
< /script>

but when I click on an image of the second gallery, I have one image of he first gallery on big size.
And when I click on an image of the first gallery, I have the mask but no big image.
In addition, the thumbs indicate the gallery's size is the first and the second together.

Anyway to put many gallery on the same page?

On touch devices no navigation in lightbox possible

While photobox works in principle on mobile devices (performance issues aside), there are problems with the handling regarding the thumbnail stripe in the lightbox. As these react only to to mouse over, it is impossible to navigate using a touch-device.
Tested on a Nexus 7 with Chrome 18.0. and Android 4.2.1 on the official demo website.

JavaScript Error on page load and also in thumb click

Uncaught TypeError: Cannot read property '0' of undefined photobox.js:454

the above javascript error when page load, i could see the same error in Demo page as well. in Chrome

Refresh the page to see messages that may have occurred before the F12 tools were opened.
SCRIPT5007: Unable to get property '0' of undefined or null reference
photobox.js, line 454 character 9
SCRIPT5007: Unable to get property '0' of undefined or null reference
photobox.js, line 454 character 9

in IE as well.

touch friendly support please!

Hi we really appreciate you making this lightbox, would you please be able to implement swipe/touch interaction for ipad/mobile device users? This is something people expect and when they try to swipe and only see arrows it confuses them...we are living in a mobile world yairEO! Thank you brother.

Layout bug in v1.9

When I updated to v1.9, the slide images are all displaced to the left by .zoomable div. If I change the css for
.video .pbWrapper > div {
display: inline-block;
}
to
.video .pbWrapper > div {
display: inline;
}
it fixes it but then videos do not show. Here is a screenshot.
photopia 2014-05-20 06-51-14

License

Can you please add a BSD License to the code please :-)

Problema : Project local

Guys, my english is not the best, but I need help.

I'm trying to create a simple but not working.
I created a simple example, as-demonstration with. JPG locally, but does not list the images.

Can anyone help me?

[div id='gallery']
     [a href="images/kartx_01.jpg"]
         [img src="images/kartx_01.jpg" alt="Foto Principal"]
     [/a]
[/div]

Fatal error with 1.6.6

Hi ! Thank you so much for this great plugin, but I must to report an error.

I have downloaded 1.6.6 version and it doesn't run on any web browser (Firefox 18, Chrome 24, Explorer 9).

In Firebug the next error appears:

http://img26.imageshack.us/img26/6200/errorgx.jpg

I use JQuery 1.9.1 and a older version of the plugin runs ok only changing the 'photobox.js' file.

Glass Enhancement?

I would like for the ability to have a div element over the image so that people cannot save the images to their computer. It could be done with CSS and could look something like the following:

        <ul id='gallery1'>
          <div style="position:relative;">
            <a href="./gallery/images/jellyfish.jpg">
              <img src="./gallery/images/jellyfish.jpg" alt="img1 title" width="100px">
            </a>
            <div class="glass">
            </div>
          </div>
        </ul>

with the CSS as the following:

.glass {
position:absolute;
left:0;
top:0;
background-image:url('./gallery/images/blank.png');
background-repeat:repeat-x repeat-y;
width:100%;
height:100%;
}

The result would be that the thumbnails and the large image is overlayed with a transparent image.

This would be greatly appreciated. I was trying to work on this myself, but could not quite get the time to understand the code.

thank you!

Zooming problem

Hi,

Thanks for this great plugin.

I've used latest version of it.

I'm facing a problem when when zooming in and out images in chrome. If you zoom in and out an image, it makes the image blurry. After zooming in an image if you hover over thumb links or toggoler then the blurry effect changes otherwise it doesn't. Please help me.

Best regards
Jos

remove vertical scrolling

How can I remove the vertical scrolling ? It serves no purpose and takes up space.

An example of what I mean is in another gallery: http://tympanus.net/Development/GammaGallery/

  • once you click an image and the gallery launches, the vertical scroll is removed; it looks so much better without the vertical scroll bar.

It's done via JS from what I can tell:

// set the overflow-y to hidden
$body.css( 'overflow-y', 'hidden' );
// force repaint. Chrome in Windows does not remove overflow..
// http://stackoverflow.com/a/3485654/989439
var el = Gamma.overlay[0];
el.style.display='none';
el.offsetHeight; // no need to store this anywhere, the reference is enough
el.style.display='block';

I'm looking to implement this into my photobox version, which btw, is the most complete photo gallery I have found :).

How can I do this ? Thank you.

IE 8

I am having some trouble getting IE 8 fallback to work. I have everything working in modern browsers. Is there anything other than conditionally loading the IE 8 css that is needed to get this to work?

Disabled loop x move with keys

Hi,
I have 2 issues with disabling loop:

  • right arrow key on the last picture go to the first picture
  • left arrow key on the first picture don't go to last picture, but transition effect is applied to actual picture

Please disable 'prev' keys on first image and 'next' keys on last image, when loop is disabled.

Thanks
Frantisek

Help needed

Thanks for sharing this great gallery!!
I have a problem to start it. i tried with demo page and also last night i saw that you updated a script but with no luck.

these are links: http://vladimirperovic.com/rafting/photobox/index2.html
and http://vladimirperovic.com/rafting/photobox/index6.html (with local jquery)
also i changed hyperlinks from ../gallery to full with http://www....

are thumbnails have to be same height/width?

it only show semi rotated images and after click blurring appeared and X mark on upper right corner. and that's all

every kind of help appreciated

[enhancement] Add missing bower.json.

Hey, maintainer(s) of yairEO/photobox!

We at VersionEye are working hard to keep up the quality of the bower's registry.

We just finished our initial analysis of the quality of the Bower.io registry:

7530 - registered packages, 224 of them doesnt exists anymore;

We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).

Sadly, your library yairEO/photobox is one of them.

Can you spare 15 minutes to help us to make Bower better?

Just add a new file bower.json and change attributes.

{
  "name": "yairEO/photobox",
  "version": "1.0.0",
  "main": "path/to/main.css",
  "description": "please add it",
  "license": "Eclipse",
  "ignore": [
    ".jshintrc",
    "**/*.txt"
  ],
  "dependencies": {
    "<dependency_name>": "<semantic_version>",
    "<dependency_name>": "<Local_folder>",
    "<dependency_name>": "<package>"
  },
  "devDependencies": {
    "<test-framework-name>": "<version>"
  }
}

Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.

NB! Please validate your bower.json with jsonlint before commiting your updates.

Thank you!

Timo,
twitter: @versioneye
email: [email protected]
VersionEye - no more legacy software!

First image problem

Hello, i'm new on that kind of forum.
Hope i do it good.
First of all i would say that you have made a great gallery! I really like.
But i have a little problem with the PhotoBox gallery.

When i click on my first image of the thumbnails, i don't have the possibility to go to the next big image.
Here's my link. It's not public yet.

http://levertasoi.fr/index2.php?rub=70&cont=1

Can you help me?

Problem on mobile device since 1.8.5

Hi,
Thank you so much for this great plugin, but since 1.8.5 i see only a black overlay, if i click on images on mobile device (ios).
can anybody help me, Thank you

Opera does not support point-events

Opera does not support pointer-events either, so at the moment photobox breaks the page in opera (simple fix isOpera = (win.navigator.appName === 'Opera'), better do feature detection though).

By the way point-events is supported in IE if applied to an SVG element

(dirty quick fix for now https://gist.github.com/glebm/5717882)

Destroy instance

Digging through the code, I wasn't able to find a way to destroy and re-create the plugin. I have a gallery where I'll add/delete images from the selector by removing a class the selector should be looking for, but it doesn't remove it from the next/prev images. It seems like your code is looking for me to remove items from the DOM, but I don't have that option with what I'm doing. Maybe we need a .destroy or something so it can be re-created? Am I missing something simple? I could just be dumb. =)

EDIT: or a manual ('reload') would be nice.

Not working with jquery 2.0.0 ?

Hi,great extension!
I updated jquery to the new 2.0.0 and it seems photobox complains!

Uncaught TypeError: Cannot read property 'toggle' of undefined photobox.js:69

Line 69 is
autoplayBtn.on('click', APControl.toggle);

Stack on Chrome console

$.fn.photobox.target photobox.js:69
fire jquery-2.0.0.js:2863
self.add jquery-2.0.0.js:2909
jQuery.fn.jQuery.ready jquery-2.0.0.js:242
(anonymous function) photobox.js:65
(anonymous function)

Thanks!

Thumbs do not show

Great Plugin !!!!
For some reason, the thumbs do not show
I used the example from the read me and no luck.
My jquery is $('.gallery').find('a').photobox({thumbs:true});

could not be located

my images can not be loaded on the ac_menu.
however i did white a php code to link my database and that's what caused the problem.

I have 404 error message.

'.$image.'

'; } ?>

anyone can help ??

.PNG Images - Gallery Error - Image Could Not Be Loaded

Using jQuery 1.9.2, I get a strange error when I try to load .PNG images:

gallery-error

However, using the same custom script and style files, the gallery will function as expected using the default script:

jQuery(document).ready(function ($)
{
    $.ajax({
        url: 'http://api.flickr.com/services/rest/',
        data: {
            format: 'json',
            method: 'flickr.interestingness.getList',
            per_page : 80,
            api_key: 'b51d3a7c3988ba6052e25cb152aecba2' // this is my own API key, please use yours
        },
        dataType: 'jsonp',
        jsonp: 'jsoncallback'
    }).done(function (data){
            var gallery = $('#gallery'), url;
            $.each( data.photos.photo, function(index, photo){
                // http://www.flickr.com/services/api/misc.urls.html
                url = 'http://farm' + photo.farm + '.static.flickr.com/' + photo.server + '/' + photo.id + '_' + photo.secret;
                var img = $('<img>').prop({'src': url + '_t.jpg', 'title': photo.title});

                var link = document.createElement('a'),
                    li = document.createElement('li')

                link.href = url + '_b.jpg';
                link.appendChild(img[0]);
                li.appendChild(link);
                gallery[0].appendChild(li);

                // lazy show the photos one by one
                img.on('load', function(e){
                    setTimeout( function(){
                        li.className = 'loaded';
                    }, 20*index);
                });
            });

            // finally, initialize photobox on all retrieved images
            $('#gallery').photobox('a', { thumbs:true }, callback);
            function callback(){
                console.log('loaded!');
            };
        });
});

My script simply loads the images from a .PHP file via ajax:

jQuery(document).ready(function ($)
{
    var $gallerySubnav = $("#gallery_subnav"), $gallery = $("#gallery"), $galleryButtons = $gallerySubnav.find("a").on("click", function ()
    {
        var dataSrc = $(this).attr("data-gallery");
        $gallery.load(dataSrc, function() {
            $(this).find("li").each(function (index)
            {
                var img = $(this).find("img"), self = $(this);
                console.dir(self);
                self.addClass("loaded");
            });

            // finally, initialize photobox on all retrieved images
            $gallery.photobox("a", {thumbs: true, time: 0});

        });
        return false;
    });
    $gallerySubnav.find("a:first-child").trigger("click");
});

I am inclined to believe that this issue is related to .PNG images, but I also get the same error when trying to load .JPG images. The image is appended in a weird way:

gallery-weird-image

Markup is the same as the demo.

Any idea what I'm doing wrong?

Example of using thumb option?

Since I am using an icon that shows on hover to open photobox and the image is not a child of that link, how might one use the 'thumb' option to set this type of path? I have tried thumb: ' .item > .effeckt-caption' but I'm unsuccessful! Here is the html layout of a thumbnail inside #gallery. The a.photobox link is for the lightbox and the other is for an info modal. Is this possible?

<div class="item">
<figure class="effeckt-caption">
 <img class="img-rounded" src="thumbs/Amber Light.jpg" width="150" height="118" alt="Amber Light"> 
<ol class="common-style">
<li class="white-rounded"><a class="photobox" href="slides/Amber Light.jpg" title="Amber Light" ><i class="fa fa-camera fa-lg"></i></a></li>
<li class="white-rounded modallink"><a data-toggle="modal" data-target="#itemModal"><i class="fa fa-info fa-lg"></i></a></li>
     </ol>                  
  </figure>
  </div>

extended code

first I want to thank you for making this beautiful easy to use plugin. I want to let you know that I have extended it, in a way. I looked at your example of how to use it and noticed that you had made use of an ajax call to the Flickr API. Well I make a plugin that extends Photobox allowing the use of a Photoset from Flickr and I changed how the gallery is created, as to allow more than one gallery to exist on the page. Please take a look at my repo here on git named: photoboxFlickrSet. Any feedback would be greatly appreciated. I also am working on an extension for Picasa and 500px

Zoom issue

When you zoom an image, change to another image and try to zoom again, it istantly goes to the old zoom value. Maybe it's something wanted, but i think it's a bit confusing...

Anyway, thanks for your work!! Do you think, in future, to support even videos? In that case, it would be the BEST gallery plugin ever!

Callbacks and html5 history api?

Great plugin.

I was wondering about what it might take to include a callback function

so that as a new image opened it would return imageID or maybe just its position.

callback: function(n){

       doSomethingHere(n);
       // for example in my case people can comment on an individual picture so I need to know which one is active and update the comment section.
}

This could also be used to update the href anchor for bookmarking purposes but that would involve a bit more work to so that http://dropthebit.com/demos/photobox#image7 would start the 'slideshow' with the 7th image open.

Thumbnail img descendants, data attributes, and turbolinks

  • Thumbnail img descendants (at the moment there is just support for children)
  • Thumb urls from data attributes (as opposed to src)
  • Photobox should initialize #pbOverlay on page load, because otherwise it breaks turbolinks, pjax, and such.

I've patched it for myself, but it'd be nice if this is supported in master.

At the moment I've patched imageLinksFilter to search for thumbnails among descendants (coffeescript below)

Photobox::imageLinksFilter = (obj) ->
  images = []
  thumbs = obj.filter ->
    $img = $(@).find('img[src]')
    images.push([@href, $img.attr('alt') || $img.attr('title')] || '') if $img.length
    !!$img.length
  [thumbs, images]

I've also patched thumbsStripe.generate with the code ($b is a dom building library):

thumbsStripe.generate = (imageLinks) ->
  thumbsList = $('<ul>')
  elements = []
  for link in imageLinks.toArray().slice(0).reverse()
    img = $(link).find('img[src]')
    title = img.attr('title') || img.attr('alt') || ''
    elements.push $b('li').append(
      $b('a', href: $(link).prop('href')).append(
        $b 'img', src: img.data('thumbUrl') || img.prop('src'), title: title
      )
    ).html()
  thumbsList.html elements.reverse().join('')
  thumbsList

And for turbolinks/jquery.turbolinks support (wouldn't be necessary if #pbOverlay was created on load), I've exposed makeOverlayContent and then:

$(document).bind 'page:fetch', ->
  if ($pbOverlay = $('#pbOverlay')).length
    $pbOverlay.off('**')
    $pbOverlay.empty().append(window.makeOverlayContent())

BUG: Destroy method

Hi, I got a warning from firefox when I call the method Destroy :

TypeError: options is undefined

(Line 288)

Please help me, Thank you.

jQuery min version is 1.7

The version required of jQuery is >= 1.7 no 1.5 how it's said in JSON file.
The function .on was included in jQuery 1.7, causing errors on jQuery 1.5

Question about specific image loading

Thank you for great plugin. The only 1 thing which I have problem with is that how can I open this gallery and automatically open specific picture, not list of thumbnails?
Let's say that I have link Image5 on the web page and after I click on it I want to open gallery but instead list of thumbnails I would like to open big image number 5 automatically.
Thank you for answer

Example code?

It would be nice if index.html had a full, working gallery instead of a bunch of extraneous code (for the fancy background, Google Analytics, etc.). I expect a sample file with only what's needed for a working photobox.

Also, when I tried inserting code from the blog post into the index.html all my images are stretch and collapsed across the top of the page.See attached, Chrome 25 OSX.
Screen Shot 2012-12-27 at 11 04 40 AM

Extra round bracket in example code

Hi,
I just noticed there is an extra round bracket in the "basic use-case example" in README.md right after { time:0 }:

$('#gallery').photobox('li > a.family',{ time:0 }), callback);

I know this is such a small thing, but oh well.

Thanks!

BUG: Close when click the next/prev button

Hi, I'm coming for another issue:

Every time I open the box the first time in the page, the box will close when I click the next or prev button. Then I open it again, it works well !

p.s. Thanks for your help in the last issue.
p.p.s My English isn't very well.

Conflict with Foundation css framework

HI

If you include foundation.css, there are some conflicts.

  1. hide class problem
    Foundation framework provides hide class, this will overwrite photobox hide class
  2. Play and close button style problem

Lazy load img help

Trying to get your lazy load image code to work with images coded on the page rather than when using json data as in main.js. Do you have an example for this type of use?

Not working in IE8

Hi

Thank you so much for this great plugin, it's wonderful!

But I have a bug report.

When I connect to the demo site, it has still javascript errors.

prop = prop[0].toUpperCase() + prop.slice(1);

I think IE doesn't understand '[0]'.

History causes problem sometimes

I am using this great plugin in a Chrome packaged app, and there seems some problem in security issue which causes the 'Close' button not working properly.

I would suggest that adding

    if( options && !options.history ) return false;

in history.clear() so that at least I can avoid this problem with { history: false }.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.