Template:Team:Edinburgh/Code

From 2013.igem.org

(Difference between revisions)
Line 286: Line 286:
$(function() {
$(function() {
-
       $(".gallery > p > a > img").css("display", "none");
+
       $(".gallery img").css("display", "none");
-
       if ($(".gallery > p > a > img")[gallery_active_id]) $(".gallery > p > a > img")[gallery_active_id].style.display="block";
+
       if ($(".gallery img")[gallery_active_id]) $(".gallery img")[gallery_active_id].style.display="block";
       setInterval("changeGalleryPic()", 5000) ;   
       setInterval("changeGalleryPic()", 5000) ;   
Line 294: Line 294:
function changeGalleryPic() {
function changeGalleryPic() {
       gallery_active_id += 1;
       gallery_active_id += 1;
-
       if (gallery_active_id >= $(".gallery > p > a > img").length) gallery_active_id = 0;
+
       if (gallery_active_id >= $(".gallery img").length) gallery_active_id = 0;
-
       $(".gallery > p > a > img").css("display", "none");
+
       $(".gallery img").css("display", "none");
-
       if ($(".gallery > p > a > img")[gallery_active_id]) $(".gallery > p > a > img")[gallery_active_id].style.display="block";
+
       if ($(".gallery img")[gallery_active_id]) $(".gallery img")[gallery_active_id].style.display="block";
}
}

Revision as of 21:24, 3 October 2013