diff --git a/src/imagelightbox.js b/src/imagelightbox.js
index <HASH>..<HASH> 100644
--- a/src/imagelightbox.js
+++ b/src/imagelightbox.js
@@ -651,8 +651,8 @@
                 }
             },
 
-            _preloadVideos = function () {
-                targets.each(function() {
+            _preloadVideos = function (elements) {
+                elements.each(function() {
                     var videoOptions = $(this).data('ilb2Video');
                     if (videoOptions) {
                         var id = $(this).data('ilb2Id');
@@ -763,10 +763,11 @@
 
         _openHistory();
 
-        _preloadVideos();
+        _preloadVideos(targets);
 
         this.addToImageLightbox = function (elements)  {
             _addTargets(elements);
+            _preloadVideos(elements);
         };
 
         this.openHistory = function() {
Added support for video preloading when adding elements to a lightbox