Skip to content

Commit 23dc8d1

Browse files
committed
fixed a bug that made it impossible to dynamically change data-strip-group
1 parent f46fce1 commit 23dc8d1

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "strip",
33
"description": "An Unobtrusive Responsive Lightbox",
4-
"version": "1.6.4",
4+
"version": "1.6.5",
55
"homepage": "http://stripjs.com",
66
"keywords": [
77
"lightbox",
@@ -28,4 +28,4 @@
2828
"dependencies": {
2929
"jquery": "^1.11.3"
3030
}
31-
}
31+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@staaky/strip",
33
"title": "Strip",
4-
"version": "1.6.4",
4+
"version": "1.6.5",
55
"description": "An Unobtrusive Responsive Lightbox",
66
"homepage": "http://stripjs.com",
77
"author": {

src/js/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ var _Strip = {
6262

6363
// if we have an element, look for other elements
6464
if (isElement) {
65-
var elements = $('.strip[data-strip-group="' + $(object).data('strip-group') + '"]');
65+
var elements = $('.strip[data-strip-group="' + $(object).attr('data-strip-group') + '"]');
6666

6767
// find possible group options
6868
var groupOptions = {};

src/js/pages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ var Pages = {
175175
$(element).addClass('strip-active-element strip-active-group');
176176

177177
// also give other items in the group the active group class
178-
var group = $(element).data('strip-group');
178+
var group = $(element).attr('data-strip-group');
179179
if (group) {
180180
$('.strip[data-strip-group="' + group + '"]').addClass('strip-active-group');
181181
}

src/js/view.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ $.extend(View.prototype, {
1717
object = {
1818
element: element[0],
1919
url: element.attr('href'),
20-
caption: element.data('strip-caption'),
21-
group: element.data('strip-group'),
22-
extension: element.data('strip-extension'),
23-
type: element.data('strip-type'),
24-
options: (element.data('strip-options') && eval('({' + element.data('strip-options') + '})')) || {}
20+
caption: element.attr('data-strip-caption'),
21+
group: element.attr('data-strip-group'),
22+
extension: element.attr('data-strip-extension'),
23+
type: element.attr('data-strip-type'),
24+
options: (element.attr('data-strip-options') && eval('({' + element.attr('data-strip-options') + '})')) || {}
2525
};
2626
}
2727

0 commit comments

Comments
 (0)