我正在使用Popcorn.js并创建以下HTML代码:
<div id="row-1">
<div style="display: none;">Hello</div>
</div>
Run Code Online (Sandbox Code Playgroud)
但现在我想添加/删除.myClass到.test使用jQuery时,DIV中的#row1是display: inline.
我试过.height(),.lenght()和.width()(但此一不工作,因为div的宽度总是1246px)
任何帮助将不胜感激!
整个HTML代码:
<html>
<head>
<script src="http://popcornjs.org/code/dist/popcorn-complete.min.js"></script>
<script src="js/jquery-1.11.2.min.js"></script>
<style>
.myClass{
background: yellow !important;
}
</style>
<script>
// ensure the web page (DOM) has loaded
document.addEventListener("DOMContentLoaded", function () {
// Create a popcorn instance by calling the Youtube player plugin
var example = Popcorn.youtube(
'#video',
'https://www.youtube.com/embed/w9l4v1s9148?controls=1' );
example.footnote({
start: 1.2,
end: 1.7, …Run Code Online (Sandbox Code Playgroud)