summaryrefslogtreecommitdiff
path: root/js/touch-imagelightbox.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/touch-imagelightbox.js')
-rw-r--r--js/touch-imagelightbox.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/touch-imagelightbox.js b/js/touch-imagelightbox.js
index d82b133..f5bbe2f 100644
--- a/js/touch-imagelightbox.js
+++ b/js/touch-imagelightbox.js
@@ -72,8 +72,10 @@
inProgress = false,
isTargetValid = function( element ) {
- this.regexValidObject = /(\.(' + options.allowedTypes + ')$)/;
- return $( element ).prop( 'tagName' ).toLowerCase() === 'a' && this.regexValidObject.test($(element).attr('href') );
+ /*jshint -W044*/
+ options.regexValidObject = new RegExp("(\.("+options.allowedTypes+")$)");
+ /*jshint +W044*/
+ return $( element ).prop( 'tagName' ).toLowerCase() === 'a' && options.regexValidObject.test($(element).attr('href') );
},
setImage = function() {