diff options
Diffstat (limited to '')
-rw-r--r-- | js/touch-imagelightbox.js | 6 |
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 |