Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed a bug that made it impossible to dynamically change data-strip-…
…group
  • Loading branch information
staaky committed Mar 14, 2018
1 parent f46fce1 commit 23dc8d1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions bower.json
@@ -1,7 +1,7 @@
{
"name": "strip",
"description": "An Unobtrusive Responsive Lightbox",
"version": "1.6.4",
"version": "1.6.5",
"homepage": "http://stripjs.com",
"keywords": [
"lightbox",
Expand All @@ -28,4 +28,4 @@
"dependencies": {
"jquery": "^1.11.3"
}
}
}
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "@staaky/strip",
"title": "Strip",
"version": "1.6.4",
"version": "1.6.5",
"description": "An Unobtrusive Responsive Lightbox",
"homepage": "http://stripjs.com",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion src/js/api.js
Expand Up @@ -62,7 +62,7 @@ var _Strip = {

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

// find possible group options
var groupOptions = {};
Expand Down
2 changes: 1 addition & 1 deletion src/js/pages.js
Expand Up @@ -175,7 +175,7 @@ var Pages = {
$(element).addClass('strip-active-element strip-active-group');

// also give other items in the group the active group class
var group = $(element).data('strip-group');
var group = $(element).attr('data-strip-group');
if (group) {
$('.strip[data-strip-group="' + group + '"]').addClass('strip-active-group');
}
Expand Down
10 changes: 5 additions & 5 deletions src/js/view.js
Expand Up @@ -17,11 +17,11 @@ $.extend(View.prototype, {
object = {
element: element[0],
url: element.attr('href'),
caption: element.data('strip-caption'),
group: element.data('strip-group'),
extension: element.data('strip-extension'),
type: element.data('strip-type'),
options: (element.data('strip-options') && eval('({' + element.data('strip-options') + '})')) || {}
caption: element.attr('data-strip-caption'),
group: element.attr('data-strip-group'),
extension: element.attr('data-strip-extension'),
type: element.attr('data-strip-type'),
options: (element.attr('data-strip-options') && eval('({' + element.attr('data-strip-options') + '})')) || {}
};
}

Expand Down

0 comments on commit 23dc8d1

Please sign in to comment.