我正在处理字幕项目,我遇到了这个错误:Uncaught TypeError: Object [object Object] has no method 'resizable'
它仍然让我知道没有 ID 为“可调整大小”的元素
我试图添加它。但是一个元素不能有多个 ID
所以你试图做的不是有效的 HTML。一个元素可以有多个类,但不能有多个 ID。
我被困住了!我该怎么做才能解决这个问题?
<html>
<head>
<title>HTML5 included Javascript....</title>
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
<!--link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css" /-->
<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="css/custom.css" />
</head>
<body>
<div class="container">
<div class="well well-sm">
<div class="row">
<div class="col-md-4">
<select class="form-control" id="options">
<optgroup label="Caption">
<option value="0">Off</option>
<option value="1">1 line</option>
<option selected value="2">2 Lines</option>
<option value="3">3 lines</option>
</optgroup>
<optgroup label="Transcript">
<option value="off2">Off</option>
<option value="4 line">4 Lines</option>
</optgroup>
</select>
</div>
<div class="col-md-2">
<button class="btn" id="returnPosition" type="button">CC return to Original</button>
</div>
</div>
</div>
<div id="container" class="video-container text-center">
<video id="video" width="930" height="500" controls autoplay>
<!-- removed: controls -->
<source src="caption.mp4" type="video/mp4">
<source src="caption.ogg" type="video/ogg">
<source src="caption.webm" type="video/webm">
</video>
<div id="subtitle draggable resizable" class="subtitle"></div>
<div class="well well-sm">
<button class="btn" id="rewind5" type="button">5 sec rewind</button>
<button class="btn" id="negative3" type="button">-3.0x</button>
<button class="btn" id="negative2" type="button">-2.0x</button>
<button class="btn" id="negative" type="button">-1.5x</button>
<button class="btn" id="normal" type="button">►</button>
<button class="btn" id="speed" type="button">1.5x</button>
<button class="btn" id="speed2" type="button">2.0x</button>
<button class="btn" id="speed3" type="button">3.0x</button>
<button class="btn" id="forward5" type="button">5 sec fast forward</button>
</div>
<textarea class="form-control" id="scroll" id="testxml" rows="4" style="display:none;" class="form-control"></textarea>
</div>
</div>
<script src="js/jquery-1.10.2.min.js"></script>
<!--script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script-->
<script src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/player.js"></script>
<script>
$( "#resizable" ).resizable();
$( "#draggable" ).draggable();
</script>
</body>
</html>
链接: http: //ge.tt/5CxOdjy/v/0