diff --git a/js/plugins/media.views.js b/js/plugins/media.views.js
index 1d497ac..c86a359 100644
--- a/js/plugins/media.views.js
+++ b/js/plugins/media.views.js
@@ -25,7 +25,8 @@ Drupal.behaviors.mediaViews = {
       // Set the current item to active
       $(this).addClass('selected');
       // Add this FID to the array of selected files
-      var fid = $(this).parent('a[data-fid]').attr('data-fid');
+      var elem = $(this).find('a[data-fid]')[0];
+      var fid = $(elem).attr('data-fid');
       // Get the file from the settings which was stored in
       // template_preprocess_media_views_view_media_browser()
       var file = Drupal.settings.media.files[fid];
