Code Monkey home page Code Monkey logo

miromannino / justified-gallery Goto Github PK

View Code? Open in Web Editor NEW
1.7K 53.0 296.0 27.65 MB

Javascript library to help creating high quality justified galleries of images. Used by thousands of websites as well as the photography community 500px.

Home Page: http://miromannino.github.io/Justified-Gallery/

License: MIT License

JavaScript 15.52% Less 0.78% HTML 83.68% Shell 0.03%
gallery justification thumbnails masonry infinite-scroll css-animations javascript justified-layout masonry-layout mason

justified-gallery's Introduction

Justified Gallery is a JavaScript library that allows you to create an high quality justified gallery of images.

Bower version npm version

This is a common problem for people who create websites: you have a series of images to display, but you are not sure how to arrange them in an elegant way. Important websites such as 500px, Flickr, or Google display images in an excellent way, justifying them similarly to brick wall. Justified Gallery will give you the power to do that too.

Justified Gallery is a professional and open source library that even 500px, one of the best photography social network, chose for displaying their images!

Release History

3.8.1

  • Added maxRowsCount parameter
  • Added support for SVG images
  • .entry-visible renamed to .jg-entry-visible to avoid too generic css classes
  • .caption renamed to jg-caption
  • Various fixes
Older versions

3.7

  • Compatible with AMD and CommonJS formats using Universal Module Definition pattern (examples provided for Webpack, Browserify, and AMD/RequireJS)
  • $.prop() changed to $.attr() because it was creating problems with Foundation
  • The library could now be used without necessarily defining it as jQuery plugin. But it still requires jQuery to provide a better browser compatibility.

3.6.5

  • For more flexibility, option imgSelector to select the image, given an image entry (e.g. a figure or a div)
  • $.attr() changed to $.prop() for better compatibility
  • Right to left option
  • Prevent gallery height collapse when the page is resized and keep the scroll position
  • Avoid width check in case the gallery is not visible

3.6.4

  • semplified the possibility to have a gallery of <figure>.

3.6.3

  • Added in thumbnailPath an extra parameter which specify the current image. In this way properties of that image could be read
  • Fixed bugs for filter when used specifying a function
  • Fixed bugs for filter when norewind is used
  • Performance improvements in case of norewind
  • Changed the selector behaviour. Only direct children of the gallery can be choose as gallery entry.
  • Fixed bug for maxRowHeight

3.6.2

  • cssAnimation = true as default. It’s time to move to the future and leave IE in the past.
  • fixed cssAnimation
  • scrollbar existence check to avoid image resizing flickering
  • The boxes could now be configured to have a background color to be visible with waitThumbnailsLoad = false.
  • removed the fixedHeight option since now this behaviour can be replicated using maxRowHeight.
  • The last row height will be calculated as the average row height of all the other rows. Before the last row height was always following the rowHeight option, that could be smaller than the effective height of all the other rows. For example: a gallery of images of 100x100px in a container of 950px, where rowHeight = 100. That gallery would contain 9 pictures for each row, and the extra space used for justification. Each row will have approximately an height of 105px after the justification. In this example the last row height would be 105px, where in the past it would usually be 100px if not justified.
  • other bugfixes

3.6.1

  • bugfixes

  • lastRow option can be 'nojustify', which is the same as 'left', or it can be 'justify', 'center', 'right' or 'hide'.

  • refreshSensitivity option, to configure the change in width allowed (in px) without re-building the gallery

  • thumbnailPath to configure JG with a custom thumbnail selector, e.g. we want to do select the correct thumbnail changing only a suffix of the current filename

     $("#myGallery").justifiedGallery({
     	thumbnailPath: function (currentPath, width, height) {
     		if (Math.max(width, height) < 250) {
     		    return currentPath.replace(/(.*)(_[a-z]+)(\..*)/, "$1_small$2");
     		} else {
     		    return currentPath.replace(/(.*)(_[a-z]+)(\..*)/, "$1_medium$2");
     		}
     	}
     });
    

3.6

  • Sort (works also with infinite scroll)

  • Filter (works also with infinite scroll)

  • Randomize images now works also with infinite scroll

  • Text entries (i.e. without images) support

  • Destroy method

  • maxRowHeight could be also a percentage

  • configurable sizeRangeSuffixes. e.g. to have only thumbnails and big images it could be:

     sizeRangeSuffixes : {
     	500: '_t',
     	2000: '_m'
     }
    
  • Configurable entry selector

  • Code refactoring

3.5.4

  • Added the border option
  • Fixed some problems with waitThumbnailsLoad and infinite scroll

3.5

  • The default suffixes are all empty, to be simpler to understand. To have the previous suffixes, the following settings can be used:

     sizeRangeSuffixes : {
     	'lt100': '_t',
     	'lt240': '_m',
     	'lt320': '_n',
     	'lt500': '',
     	'lt640': '_z',
     	'lt1024': '_b'
     }
    
  • Now is possible to have entries with the structure:

     <div>
     	<a href="...">
     		<img src="..." />
     	</a>
     	<div class="caption">...</div>
     </div>
    
  • Fixed margins

  • The border of the entire gallery can be customized

  • Corrected bugs for the callbacks when waitThumbnailsLoad = false

3.4

  • Performance improvements
    • In presence of width and height attributes in thumbnails, and with the option 'waitThumbnailsLoad', the layout is immediately built, and the thumbnails will appear randomly while they are loaded.
    • Other code refactorings to be more performant
  • With nojustify, if there is only a row, it doesn't justify anything. The previous behaviour seems too like a bug than a feature.
  • Infinite scroll example with plain javascript to be more understandable.
  • Fixes some bugs with infinite scroll

3.3

  • No more crops

    • Removed some floating point approximations that caused some small crops
  • Initial opacity settings for the caption to allow them to be always visible

    • Can be also configured changing the less file, if one prefers CSS animations
  • All caption settings in a single object to be more compact

     captionSettings : { //ignored with css animations
     	animationDuration : 500,
     	visibleOpacity : 0.7,
     	nonVisibleOpacity : 0.0
     },
    
  • Justification formulas refactoring to be more maintainable

3.2

  • A gallery of div can be used instead of a
  • Fixed errors for the last rows
  • Option to use only css animations (i.e cssAnimation)
  • Without css animations
    • Configurable caption fadein/fadeout time (i.e. captionsAnimationDuration)
    • Configurable caption final opacity (i.e. captionsVisibleOpacity)
    • Configurable images fadein time (i.e. imagesAnimationDuration)
  • Configurable treshold that decides to justify the row also in presence of nojustify (i.e. justifyThreshold)

3.1

  • Improved the algorithm to reduce the image crops
  • Fixed errors with some jQuery versions
  • Fixed errors with fixed height
  • Settings checks and parsing
  • Added event jg.rowflush

3.0

  • Totally rewritten!
  • Row by row loading
    • The plugin doesn't wait that all the gallery thumbnails are loaded
    • A row is printed when the its thumbnails are available
    • Non-blocking layout creation
  • No more white spaces (If the gallery needs to load a bigger image, it first show the smaller and then replace it with the bigger)
  • Improved the algorithm for a better result
    • No more white pixels at the end of a row (bugfix)
    • Reduced a lot the image crops
      • Vertical centering
      • Proportional images enlargement looking the image aspect ratio
  • Improved the algorithm efficiency
    • No more extra tags or new elements added to create the layout
    • All the images remain in the DOM, they aren't deleted or created
      • Hence, each tag remains in the links and in the images
  • Added maxRowHeight option
  • Custom captions
  • Thumbnails randomization (randomize option)
  • Statefulness
    • can be called again changing only some settings
    • can be called again to update the layout (after add or remove of images)
  • Infinite scroll capable
  • Improved last row behavior
    • Last row option changed
      • justifyLastRow setting has been renamed to lastRow, and it accepts: 'justify', 'nojustify', 'hide'.
    • Option to hide the row if it is incomplete and cannot be justified
    • The plugin can justify also with lastRow = 'nojustify', if the free space is small.
  • Silent error handling
    • If a thumbnail doesn't exists, it is ignored in the layout (hided)
    • If the plugin needs an inexistent thumbnail, it maintains the previous one
    • Errors are still visible in the console
  • Loading spinner
    • Visible when a new row needs to be loaded
    • Pure CSS spinner
    • Configurable changing the CSS/Less
  • Project structure
    • Grunt to manage the build
    • Less
    • Tests
    • Javascript and CSS validation
    • CSS filename changed to be more standard
  • License changed to MIT
  • Improved the gallery size check to be less invasive
  • Fixed lightbox removal when the page is resized

2.1

  • Setting removed: 'usedSizeRange', now the plugin do it automatically
  • Setting behavior changed: 'extension', now it accept a regular expression. The old behavior still works, but is not safe.
  • New behavior: if an image defines the attribute data-safe-src, this is choice, no matter what the src attribute is. This can be used to avoid the problems with Photon or other services that resize the images, changing the image srcs.

2.0

  • Setting removed: 'lightbox', now can be done simply with the onComplete callback.
  • Added Setting: 'rel' to change all the links rel attribute.
  • Added Setting: 'target' to change all the links target attribute.
  • Setting name changed: 'complete' to 'onComplete'.
  • Setting name changed: 'sizeSuffixes' to 'sizeRangeSuffixes'.
  • Setting name changed: 'usedSuffix' to 'usedSizeRange'.
  • Added the CSS for the div that shows the Justified Gallery errors. Now can be changed, or hided.

Contributing

Important notes

Please don't edit files in the dist subdirectory as they are generated via Grunt. You'll find source code in the src subdirectory.

Code style

Regarding code style like indentation and whitespace, follow the conventions you see used in the source already.

Modifying the code

  • Prerequisites:

    • Node.js
    • Install Grunt with npm install -g grunt-cli.
    • Install Yarn with npm install -g yarn
  • Build:

    • yarn install to install all dependencies.
    • grunt debug to build the library only for testing (debug mode).
    • grunt to build this project in release mode.

Submitting pull requests

  • Create a new branch, please don't work in your master branch directly.
  • Add failing tests for the change you want to make.
  • Fix stuff.
  • Ensure that the written tests don't fail anymore, as well as the other tests.
  • Update the documentation to reflect any changes.
  • Push to your fork and submit a pull request.

justified-gallery's People

Contributors

copitz avatar daflip avatar dependabot[bot] avatar fxkr avatar gunnarlieb avatar jafin avatar marekdedic avatar mattnathan avatar miromannino avatar morganseznec avatar sc0ttman avatar sija avatar stackcoder avatar twaurisch 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

justified-gallery's Issues

Feature Suggestion Removing last row option

I believe sometimes the images do not matter as much as the style and layout.

Would it be possible to have an option to remove the images that end up in the last row?

It would be fantastic.

Disable Justified-Gallery when not needed.

I have problem then my design get changes by css media, after resize my gallery div must be horizontal with overflow-x:auto, and all images in one line with my own css. On resize then vertical gallery apear(works nice) and horizontal disapear i need turn on Justified-Gallery.

P.S. I can't find function that undo script changes and do it again by screen width

Lazy Loading

Hi, Amazing plugin!!

I have a situation where I load really large number of images and the users are having to download 40 MB. Its taking a long while to load.

Is it possible to do lazy loading of images? I can supply the image dimensions from the server side.

Or can we do it like this? - Use div in place of img? and use background-image to show images. I can lazy load background images and your plugin gets the width and height it needs.

Please point me in the right direction ❤️

Center image

Is there a way to display center cropped images instead aligned to the top?

Fixed captions

Hi! This is plugin is great – thanks so much. Is it possible to show the captions without hover, and without sitting over the image? So I guess this would mean extra space underneath each image.

Link arround Img ib Div

div class='item'
  a href='#'
    img src'...'
  /a
  div class='cation'
    text
  /div
/div

the case will not work properly

Instructions for dummies?

Could someone please help explain to me where to put what code to make this work? I'm horrible at CSS and only understand the HTML parts. Also - not sure how to even install anything or if I have to. I installed the Flickr Photostream plugin and JQuery Updated and that's as far as I've gotten. I've been looking through the documentation but apparently either I can't open the document I need to help me or I can't find it.

Any help is much appreciated. I'm getting pretty burnt out and can't find a single friend of mine to help me. =\

lastRow doesn't work

Hi Miro,

First, thanks for this awesome plugin. Everything works well except the lastRow option. I can't seem to make the lastRow 'nojustify' or 'hide'. It is always scretched / justified. I can't see 'nojustify' showcase on your demo site either. Can you check?

Thanks!

Image cant be loaded!

May I know why I get "Image can't be loaded" for online links?

<a href="http://sphotos-c.ak.fbcdn.net/hphotos-ak-ash4/s480x480/420735_10151557881529647_815211249_n.jpg" title="What's your destination?">
    <img alt="What's your destination?" src="http://sphotos-c.ak.fbcdn.net/hphotos-ak-ash4/s480x480/420735_10151557881529647_815211249_n.jpg" />

Vertical Grid

Hi, is there an option for vertical grid (pinterest style)?
Thanks for a great plugin!

Works locally but not online

Hi, great plugin but for me it's not working online once I've uploaded it.
I've double checked that the .js and .css files are uploaded and in the right directories.
It's the first time I've used Bootstrap and that works all fine, it's just the Justified Gallery plugin.

It does work when I've previewed it locally through chrome/ff via Dreamweaver.

Please help, thanks

Andrew

Images full width

I change rowHeight: 160 and run fixed_height.html,
Any image full width
fixed_height

Gallery with Infinite Scrolling

Hello,

I'm seeing errors in the console and can't exactly find out what the problem is. I hooked up the latest version (v3.3) with Paul Irish's infinite scrolling. The problem, is whenever the infinite scrolling tries to get new results, I see this in the console when using the justified gallery minified js:

"TypeError: m.match(...) is null
...,g),b.css("left",f);var m=l.attr("src"),n=m.replace(k.settings.extension,"").rep..."

Using the unminified js, I get the following:
"TypeError: imageSrc.match(...) is null
imageSrc.match(context.settings.extension)[0];"

This problem also occurs on v3.2, but not v3.1. Version 3.1 loads the new images with infinite scrolling fine. Unfortunately, I'm not too familiar with javascript, so maybe I'm missing something here. Some image sizes and their respective suffixes aren't available -- does that cause a problem post v3.1? I would appreciate your help.

Version 2.x not available with bower

I'm not able to install version 2 with bower, only version 1.

Please add a bower.json and/or fix the change version numbers to x.y.z to fix this.

bower Justified-Gallery#*       cached git://github.com/miromannino/Justified-Gallery.git#1.0.4
bower Justified-Gallery#*     validate 1.0.4 against git://github.com/miromannino/Justified-Gallery.git#*

{
  name: 'Justified-Gallery',
  homepage: 'https://github.com/miromannino/Justified-Gallery',
  version: '1.0.4'
}

Available versions:
  - 1.0.4
  - 1.0.3
  - 1.0.2

Option for no crop sizes?

Hi, this plugin is rad and just what we were looking for. We don't have multiple crop sizes though, and each time the script runs it 404s looking for other sizes. Is there a way to disable this? I tried passing an empty array {} for the sizeRangeSuffixes option. Let me know if there is any easy way to do this. I currently have it working with removing line 82 : getSuffix(imgWidth, imgHeight, context) +

One y Two image

Hi, great plugins!

I have a situation, when I have 1 or 2 images, this images are stretched, how not justified if is only 1 or 2 images, for example?

Thanks!

Submit project to Bower

This project looks great. Have you considered registering it with Bower to make it easier to insert into new project?

Height of gallery calculated to 33554382px

Hi Miro,
I am loading images from a remote location and adding them to the gallery div.

In all cases, the height is calculated to 33554382px, with different kind and amount of photos. Any idea?

Best regards, jr

Minimum row height

Hi

I have a gallery with a row height of 340 (fixed height), last row justify and max row height -1. Sometimes, justifying makes the pictures in the last row much smaller than the normal rows.

I would rather have a last row with a really big image instead of a very cramped row with many small images. Is there a way to specify a minimum height for the last row?

Regards,
Freyana

3.0.0 RC Broken on IE9+

Love the work done on 3.0.0, we're happily using it in production already. However it looks to be broken on IE9+. We disabled it for IE users.

Going to see if we can push in a fix/figure it out for you.

Infinite "loading" progress

Hi, i have intergrated Justified-Gallery in my website, but sometimes the gallery doesn't load at all, and the "loading" progress image stays on the screen forever. It only happens sometimes, but I can't figgure out a rule.
Is there anyway I could fix that? Thanks.
(I'm using Firefox 29.0.1.)

rearrange positioning of images

I'm trying to make a fadeOut in some elements, but the elements that continue to appear are not reorganizing.

How can I solve?
Thanks.

using 'Justified Gallery' only with one Image copy.

Hay, I want to use 'JG' without having 6 cropped copies of images based on size. I have a URL that needs to be displayed on the page.
Can I achieve that using Justified Gallery Plugin?
also I don't want to use '_t' '_m' '_n' '_z' '_b' etc in the end of FileName.
is there any way you suggest?

Please stop hardcoding styles & animations

Instead of using jQuery's "fadeIn" & "fadeOut" you should instead consider applying a semantic class. As a developer I can hook CSS transitions to these semantic classes if I do want to opt-in to animations.

For example:

function onEntryMouseEnterForCaption (sender) {
            $(sender.currentTarget).find('.caption').stop().fadeTo(500, 0.7);
        }

I wish that would change to:

function onEntryMouseEnterForCaption (sender) {
            $(sender.currentTarget).find('.caption').toggleClass('mouse-over');
        }

I can then choose what opacity I want to correspond with the mouse being over it. 0.7 is an arbitrary opacity that you've chosen because you like it, but its qualitative & other people may not like it at 0.7 but may want 1.0... But this is just a simple example. Maybe I don't even want to animate the opacity but maybe I instead want to 'slide' in with CSS transform, maybe I want a custom bezier acceleration curve with keyframes, etc..

Another example of why its problematic is you fadeOut() for 500ms then fadeIn() for another 500ms. I'm screen capturing the page with phantomjs to generate a thumbnail for the gallery itself, and this adds an additional 1000ms latency before I can screen capture the page... so I'm now having to fork the project simply because I want to opt out of this 1000ms animation that's being animated for a computer who doesn't even see it (headless web browser client).

Please consider allowing us to disable the animations via a setting, or even better, simply toggle classes like switch the elements class from jg-loading to jq-loaded and let us users apply the styles that we want for those classes.

Putting the animations into JS makes things impossible to override. Also jquery animations can kill performance on mobile devices whereas CSS3 transitions are very smooth on all devices.

Image problem

I have already repaired it but I dont know why but it doesnt wanted to read one image, when I opened image normally it was ok but when JG loaded it, it stoped in process and I didnt know why, no result shown , just white box.

But when I reuploaded that image , everything went ok. What should have been problem ? I can't reupload images automatically when this "error" happens , cause it was really hard to find out what the problem is and which image is not ok.

No error , but just stoped process with one image , which all browsers have loaded correctly, only JG not. It was .jpg

IE caption problem

Hello, I have a problem with, I have
tag in my caption and every browser is ok with that but only IE I dont know why separates that caption to two different jg-image-labels.

image

and this is how it should looks like
image

please can you help me somehow ? The only change that I have made in your script is that I've used title as caption and not alt ;)

Thank you

error

Hello!

In row
$(el).justifiedGallery({rel: 'gal' + i}).on('jg.complete', function () {

i get a error

TypeError: $(...).justifiedGallery is not a function.

Question on infinite scroll implementation

If there is new content added to #mygallery via an ajax call we have to call $("#mygallery").justifiedGallery(); again to get the new images justified.

Is there a possibility to call the function only on the last line of the "old" content and the "new" content instead of justifiying the whole gallery on every call?

Add custom caption style for each image

Hey.

Firstly, great plugin. I loved it.

Although, I felt this needs another functionality before anything else. That is the ability to add custom HTML or style for each image. You have provided a style for displaying the captions, but I want to add my own div to display the captions in my own way, with a few anchor tags and other HTML tags. Do you have an existing solution for this? If not then can you look into this please? It would be great. I have also seen a few other people face this issue. This would help them too.

Thanks.

Rails 4.0 image path issues.. trouble installing

Hi,
I tried to install the JG in a rails 4.0 project. After copying the js & css files. The expected behavior of the images is not as demonstrated, meaning when i click on them they don't pop up and don't have ability to scroll back & forth as it does in the demo. Or does that need a different plugin?

Image ex:
screen shot 2014-06-28 at 10 14 39 pm
screen shot 2014-06-28 at 10 14 49 pm

Code:

<div id="mygallery" >
  <% @user.portfolios.each do |p| %>      
        <%=link_to image_tag(p.image.url, size: "150x150", :class => "img-rounded img-responsive"), p.image.url %> 
    <% end %>

</div>

<script type="text/javascript">
$(document).ready(function(){
$("#mygallery").justifiedGallery();
});
</script>

Thank you

Append Images Option

I'm working on trying to append more photos to the end of the gallery and would like a way to get justified gallery to draw in the new photos into the existing ones considering any available white space. It would help in integrating infinite scroller/loading.

Trouble loading any image

I am trying to use the Justified-Gallery plugin in a gallery service on my personal website.

I have a php script that outputs all of the pictures in a directory to the page and then I call the justified-gallery plugin. It always returns the error: "The image can't be loaded: "photo/Cat_Harbor_Upper_Penninsula_m.jpg"" The actual file name, however, does not have the trailing "_m" that the error message gives. If I remove the call to the justified-gallery plugin the images load up just fine.

Here is a link to the page I am referring to:
http://mutablemango.com:8080/joel/web/gallery.php

XSS issue. Unable to escape alt text.

I'm having an issue where I am binding html to the alt attributes of images which are inside of a gallery.

Especially when used in combination with something like Swipebox, it's nice to allow HTML here so that image captions can contain formatting such as italics. This does however have the side effect of making the (hover) alt text show markup.

Is having HTML within the alt attribute a valid use of this library?

My case is an output issue and sanitising the data server-side is not an option.

This is demonstrated here:
http://jsfiddle.net/p0fm2rp6/1/

Workarounds welcome.
(awesome plugin by the way 😄 )

swipebox.html index error

in test/main/swipebox.html
when remove one row <div class="swipeboxEx"></div> and click the image , the swipebox goes wrong.

I fix it as the following:
if (i == 1) $('.swipeboxEx a').swipebox();
=>
if (i == 0) $('.swipeboxEx a').swipebox();

Trigger spinner before AJAX request for loading the referenced photos

Hi,
which option do I have to trigger the spinner before requesting the referenced photos by AJAX?

Use case: Already the AJAX request for getting the photos takes a long time. During this time, the end user does not see a loading indicator. This will be displayed just after the photos are loaded and the gallery is instantiated.

Thanks and regards

increase entry height

Hi
Great work on this plugin!
I'm trying to figure out if there is a way to leave a space of lets say about 30px at the bottom of each containing div?

3.1.0 completely broken

I had a working implementation with 2.1:
selection_007

Then all I did was I switched the library out with 3.1.0 and reloaded my page & got this:

selection_006

My code is nothing out of the ordinary I don't think:

<div id="photoset_images_ss">
            <a href="#"><img src="..." /></a>
            <a href="#"><img src="..." /></a>
            <a href="#"><img src="..." /></a>
             ...
    </div>

    <style type="text/css">
        #photoset_images_ss {
            width:1600px;
        }
        #photoset_images_ss img {
            border:1px red solid;
        }
    </style>

    <script>
        $(document).ready(function() {
            $('#photoset_images_ss').justifiedGallery({
                'rowHeight' : 400,
                'fixedHeight' : false,
                'justifyLastRow': true,
                'captions' : false,
                'margins' : 2,
                'refreshTime': 500000, // no need to refresh. phantom loads it with an 1600^2 viewport, screengrabs & exits.
                'sizeRangeSuffixes': { 'lt100':'',
                    'lt240':'',
                    'lt320':'',
                    'lt500':'',
                    'lt640':'',
                    'lt1024':''},
                'onComplete': function() {
                    $('.jg-row').slice(2).remove();
                    if (typeof window.callPhantom === 'function') {
                        window.callPhantom({ hello: 'world' });
                    }
                }
            });
        });
    </script>

images not loaded

Hi, I love this plugin so much and really appreciate your work.

I created a HTML page with this plugin(v3) and it seems to be great except only one problem: images are not loaded .

In Firefox(v28.0) images are never loaded, only the loading animation is showing up.

In Chrome(v33) this was almost half to half, half times they are loaded perfectly and the other was the same as Firefox.

In IE7/8, no problem at all.

Q: Infinite scroll and history.pushstate

I'm trying to track 'anchors' in my dynamically loading infinite scroll for updating page numbers in the address bar with history.pushstate. I found an example which does this and tuned it a bit to work with my code. Until i call the justifiedGallery function everything works, but somehow the tracking gets messed up when the output is formatted. Hoping someone can help me out :)
Here is my example http://jsfiddle.net/zYe8M/30/

CSS caption

With version 3.2.0 you use keyframes for caption animation. If I use the new flag cssAnimation:true, there is no mouseout animation. I think you should use CSS transition like in previous versions. Or should I write keyframes for mouseout?

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.