From e9c19525cdaaa3117b9523496453dddf6c5d0783 Mon Sep 17 00:00:00 2001 From: Duncan McDougall Date: Wed, 24 Jul 2013 18:07:33 +0100 Subject: [PATCH] Can now lightbox multiple lightbox groups on same page See demo. --- demo/groups.html | 62 ++++++++++++++++++++++++++++++++++++++++++ jquery.lightbox.js | 10 ++++--- jquery.lightbox.min.js | 14 +++++++++- readme.markdown | 13 +++++++-- 4 files changed, 91 insertions(+), 8 deletions(-) create mode 100644 demo/groups.html diff --git a/demo/groups.html b/demo/groups.html new file mode 100644 index 0000000..9f03c9d --- /dev/null +++ b/demo/groups.html @@ -0,0 +1,62 @@ + + + + + Demo + + + + + +
+

Responsive Lightbox

+

Group 1

+ +

Group 2

+ + +
+ + + + + + \ No newline at end of file diff --git a/jquery.lightbox.js b/jquery.lightbox.js index a477393..e05a63a 100644 --- a/jquery.lightbox.js +++ b/jquery.lightbox.js @@ -30,13 +30,15 @@ image: null, current: null, locked: false, - + selector: "#lightbox", + init: function (items) { plugin.items = items; + plugin.selector = "lightbox-"+Math.random().toString().replace('.',''); if (!plugin.lightbox) { $('body').append( - '