-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjquery.carouselVideo.js
More file actions
62 lines (44 loc) · 1.44 KB
/
Copy pathjquery.carouselVideo.js
File metadata and controls
62 lines (44 loc) · 1.44 KB
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
55
56
57
58
59
60
61
62
(function($)
{
$.fn.carouselVideo=function(options)
{
var defauts =
{
"miniature" : "",
"video" : ""
}
var parametres=$.extend(defauts, options);
/*this.each(function()
{
alert(window.location.hostname);
var video;
var titleVideo;
var txtVideo;
$('.tmpl.videoSmall a').click(function () {
video = $(this).data('id');
video = 'http://video.epita.fr/player-html5-' + video + '.html';
$('.videoBig iframe').attr('src', video);
titleVideo = $(this).parent().next().text();
$('.videoBig .txt h3').text(titleVideo);
textVideo = $(this).parent().next().next().children().clone();
console.log(textVideo);
$('.videoBig .txt .videoText').html(textVideo);
});
});
return this;*/
}
var video;
var titleVideo;
var txtVideo;
var url = window.location.hostname;
var urlVideo = url.replace(/www/i, "video");
$(parametres.miniature + ' a').click(function () {
video = $(this).data('id');
video = 'http://' + urlVideo + '/player-html5-' + video + '.html';
$(parametres.video + ' iframe').attr('src', video);
titleVideo = $(this).parent().next().text();
$(parametres.video + ' h3').text(titleVideo);
textVideo = $(this).parent().next().next().children().clone();
$(parametres.video + ' p').html(textVideo);
});
})(jQuery);