1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
| $(document).ready(function(){
$(".video_list_content_movie").first().css("border-top", "none");
$(".video_list_content_movie").last().css("border-bottom", "none");
$(".video_list_content_movie").last().css("margin-bottom", "10px");
$("#video_list_content").hide();
$("#player").hide();
$(".video_list_content_url p").hide();
$("#video_list_title").toggle(
function () {
$(this).css("border-radius", "5px 5px 0 0");
$(this).css("-moz-border-radius", "5px 5px 0 0");
$("#video_list_content").fadeIn("slow");
},
function () {
$(this).css("border-radius", "5px");
$(this).css("-moz-border-radius", "5px");
$("#video_list_content").fadeOut("slow");
$("#player").fadeOut("slow");
$(".video_list_content_url a").show();
$(".video_list_content_url p").hide();
}
);
$(".video_list_content_url").click(function(){
var obj = this;
// fermer ce qui est ouvert
$(".video_list_content_url").each(function(i, item){
if (item != obj) {
if ($("p", item).css("display") == "block"){
$("#player").fadeOut("slow");
$("p", item).hide();
$("a", item).show();
}
}
});
// ouvrir ou fermer cette vidéo
if ($("p", obj).css("display") == "none"){
$("#player").fadeIn("slow");
$("a", obj).hide();
$("p", obj).show();
$("#player").find("video").attr("src", $("a", obj).attr("href")).fadeIn("slow");
} else {
$("p", obj).hide();
$("a", obj).show();
$("#player").fadeOut("slow");
}
});
}); |
Partager