Permalink
Browse files

add option to show first image only, bump version

  • Loading branch information...
1 parent 0171d7f commit d6a1cd9814b0b2d795f6c45640dfe2622a5f0844 @phlipper committed Mar 24, 2010
Showing with 10 additions and 3 deletions.
  1. +10 −3 jquery.fancy-photoset.js
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);

0 comments on commit d6a1cd9

Please sign in to comment.