为什么我的代码不能正常工作并调出Soundcloud Stratus播放器? :(我不太清楚Javascript。他们说这就是你要做的所有事情,它会出现,但事实并非如此。我已经尝试了很多东西!:(
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Blazing Audio | Buy Beats & Instrumentals For $1</title>
<script type="text/javascript" src="http://stratus.sc/stratus.js"></script>
<script src="http://code.jquery.com/jquery-1.7.2.js"></script>
<!-- SCRIPTS -->
<script type="text/javascript">
$(document).ready(function(){
$('body').stratus({
auto_play: true,
download: false,
links: 'https://soundcloud.com/blazingaudio/sets/rap-instrumentals',
random: true
animate: slide,
buying: true,
position: fixed,
user: false,
stats: false,
align: bottom,
});
});
</script>
</head>
<body>
</body>
</html>
答案 0 :(得分:1)
按以下顺序添加外部js:
<script src="http://code.jquery.com/jquery-1.7.2.js"></script>
<script type="text/javascript" src="http://stratus.sc/stratus.js"></script>
我更新了您的代码,现在正在运行:
$(document).ready(function(){
$('body').stratus({
auto_play: true,
download: false,
links: 'https://soundcloud.com/blazingaudio/sets/rap-instrumentals',
random: true,
buying: true,
user: false,
stats: false,
});
});
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - jsFiddle demo by Zword</title>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.8.18/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="/css/result-light.css">
<script type='text/javascript' src="http://stratus.sc/stratus.js"></script>
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
$(document).ready(function(){
$('body').stratus({
auto_play: true,
download: false,
links: 'https://soundcloud.com/blazingaudio/sets/rap-instrumentals',
random: true,
buying: true,
user: false,
stats: false,
});
});
});//]]>
</script>
</head>
<body>
</body>
</html>