Permalink
Browse files

Merge branch 'show-first-only'

  • Loading branch information...
2 parents 0171d7f + da7320d commit 55559e2615c87536711c87fec81275c68aa9c0f0 @phlipper committed Mar 24, 2010
Showing with 20 additions and 8 deletions.
  1. +4 −0 CHANGELOG.md
  2. +2 −1 README.md
  3. +2 −2 demo/jquery.fancy-photoset.min.js
  4. +10 −3 jquery.fancy-photoset.js
  5. +2 −2 jquery.fancy-photoset.min.js
View
@@ -1,5 +1,9 @@
# Fancy Photoset CHANGELOG
+## 0.2.0
+
+* Add option to show only the first image in the set on the page
+
## 0.1.1
* Add 'large' size from Flickr
View
@@ -64,14 +64,15 @@ The plugin supports multiple photoset galleries per page:
* small - The smaller thumbnail version of the image to show. This corresponds to one of the following Flickr sizes: small, medium, large, original, thumbnail and square.
* large - The larger version of the image link to and display in the Fancybox. This corresponds to one of the following Flickr sizes: small, medium, large, original, thumbnail and square.
* captions - true or false: This will create a <span class="caption"> with the photo title if set to true.
+* firstOnly - true or false: Setting true will only display the first image in the photoset on the webpage. All images will still be available to the Fancybox gallery.
## Demo
See the demo.html file in the demo folder for an example of how to use the script. All you will need to run the demo is your API Key and a Photoset ID.
## Version
-The current version is 0.1.1
+The current version is 0.2.0
## License
Oops, something went wrong.
View
@@ -2,7 +2,7 @@
* Dual licensed under the MIT (MIT_LICENSE.txt)
* and GPL Version 2 (GPL_LICENSE.txt) licenses.
*
- * Version: 0.1.1
+ * Version: 0.2.0
* Requires jQuery 1.4.2+, Fancybox 1.3.1+
* Docs: http://phlippers.net/code/fancy-photoset
*/
@@ -14,6 +14,7 @@
return opts[match.replace(/\{|\}/g, '')];
});
+ // Create a fancyPhotoset for each selector
return this.each(function() {
var obj = $(this);
$(obj).append(
@@ -31,7 +32,12 @@
).fancybox()
)
);
- })
+ });
+
+ // Hide all except the first image
+ if (opts.firstOnly) {
+ $(obj).find('li').not(':first').hide();
+ }
});
});
};
@@ -70,6 +76,7 @@
photosetId : '',
small : 'square',
large : 'medium',
- captions : true
+ captions : true,
+ firstOnly : false
};
})(jQuery);
Oops, something went wrong.

0 comments on commit 55559e2

Please sign in to comment.