diff options
Diffstat (limited to '')
-rw-r--r-- | dist/touch-imagelightbox.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/dist/touch-imagelightbox.js b/dist/touch-imagelightbox.js index 7113c3c..9726a0e 100644 --- a/dist/touch-imagelightbox.js +++ b/dist/touch-imagelightbox.js @@ -1,4 +1,4 @@ -/*! touch-imagelightbox - v0.1.0 - 2014-06-24 +/*! touch-imagelightbox - v0.1.0 - 2014-06-27 * https://github.com/victorhaggqvist/touch-imagelightbox * Copyright (c) 2014 Osvaldas Valutis (www.osvaldas.info); Licensed MIT * Contributors Victor Häggqvist (victorhaggqvist.com) */ @@ -75,8 +75,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() { |