Выпуск Jquery-трубчатых плагинов
Я пытаюсь сделать свой первый видео фон и нашел этот трубчатый плагин. когда я следую за шагом, кажется, что добавление кода в тело становится сложным. Я добавил ссылку jquery и по какой-то причине код, который я добавил, недействителен. Может кто-нибудь помочь мне, как сделать этот плагин работает?
Это инструкция, которой я пытаюсь следовать: https://code.google.com/p/jquery-tubular/
Заранее спасибо!
вот мой код:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Using Tubular Plugin</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.tubular.1.0.js"></script>
<style type="text/css">
body,html { margin:0; padding::0; height:100%; width:100%;}
#topSection {
background-color: #D8D8D8;
height:100%;
min-height:100%;
width:100&;
position:relative;
}
</style>
</head>
<body>
$().ready(function() {
$('#wrapper').tubular({videoId: 'idOfYourVideo'}); // where idOfYourVideo is the YouTube ID.
});
<section id="topSection">Top section- I need a youtube video background here</section>
</body>
</html>
1 ответ
Привет. Вы пытались вызвать jQuery из головы. Вы должны добавить кусок кода, как:
<script>
$("document").ready(function() {
var options = { videoId: "xp-8HysWkxw", // where idOfYourVideo is the YouTube ID.
start: 0,
repeat: true
};
$("#page").tubular(options); // Here is the jQuery call
});
</script>