From 1500a97c35e3a0231e21ac6fcb015fbfa941f9d4 Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 15 May 2012 03:26:55 +0530 Subject: [PATCH] remove index, eq magic and just reference videos by db ids --- itf/templates/modules/festival/meeting.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/itf/templates/modules/festival/meeting.html b/itf/templates/modules/festival/meeting.html index a273c59..5a721b5 100755 --- a/itf/templates/modules/festival/meeting.html +++ b/itf/templates/modules/festival/meeting.html @@ -92,7 +92,7 @@ {% endfor %} {% for v in talk.videos.all %} - + @@ -100,7 +100,7 @@    {{ talk.title }} {% if talk.presenter %} by {{ talk.presenter }} {% endif %} {% for v in talk.videos.all %} -
+
{% endfor %} @@ -256,8 +256,9 @@ }); */ $('a.padmaLink').toggle(function() { - var index = $(this).index('.padmaLink'); - var $video = $('.padmaVideo').eq(index); + var padma_id = $(this).attr("data-video-id"); + + var $video = $('.padmaVideo[data-video-id=' + padma_id + ']'); if ($video.data("padmaLoaded")) { $video.slideDown(); } else {