diff options
author | Victor Häggqvist <[email protected]> | 2014-06-26 17:53:57 +0200 |
---|---|---|
committer | Victor Häggqvist <[email protected]> | 2014-06-26 17:53:57 +0200 |
commit | 4e90479ad2a185efb98a9e4b0bd83407ffeba2df (patch) | |
tree | 3e6297b256176968bea49bfb7a98a50280c1cf91 | |
parent | 875c28b6f748eb3c65ce7821d3e128a46ebd8d1b (diff) |
regex fix
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 |