aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2014-06-27 15:09:39 +0200
committerVictor Häggqvist <[email protected]>2014-06-27 15:09:39 +0200
commit9055544434188f48d12e5227cd74c2e863dfdb41 (patch)
tree40cfd77a65ca1f9523aca24d75d63b12b090debc
parent58a83ce1f985395296a325dc219736ced1acd315 (diff)
parent4e90479ad2a185efb98a9e4b0bd83407ffeba2df (diff)
Merge branch 'master' of gitlab:victor/touch-imagelightboxv0.1.3
merge
-rw-r--r--js/touch-imagelightbox.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/touch-imagelightbox.js b/js/touch-imagelightbox.js
index d82b133..db4b60c 100644
--- a/js/touch-imagelightbox.js
+++ b/js/touch-imagelightbox.js
@@ -72,8 +72,8 @@
inProgress = false,
isTargetValid = function( element ) {
- this.regexValidObject = /(\.(' + options.allowedTypes + ')$)/;
- return $( element ).prop( 'tagName' ).toLowerCase() === 'a' && this.regexValidObject.test($(element).attr('href') );
+ options.regexValidObject = new RegExp("(\.("+options.allowedTypes+")$)");
+ return $( element ).prop( 'tagName' ).toLowerCase() === 'a' && options.regexValidObject.test($(element).attr('href') );
},
setImage = function() {
@@ -329,4 +329,4 @@
return this;
};
-})( jQuery, window, document );
+})( jQuery, window, document ); \ No newline at end of file